Hi,
I am calculating days and hours between two dates (admission date/time and discharge date/time), thanks for any suggestions.
Example attached:
clear
input str9 admi_date str9 admi_time str9 dischage_date str9 dischage_time
1 11jan2019 1154 12jan2019 0716
2 15feb2019 0217 08oct2018 0934
3 01dec2019 2314 09feb2020 0817
end
The final results should have two new variables, one denotes the total days between two dates, and another one indicates the total hours between two dates.
Best,
Zichun
Related Posts with How to calculate days and hours between two dates
How to run individual cross sectional regression and obtaining residuals?..Hello Everyone! I am totally new to STATA, and I have a brief question about running individual cros…
Extending dataset based on certain dateDear Stata Users, Please help me with the following issue. I need to extend the following data set …
Comparing Means without Standard DeviationHello, My colleague and I are working on a latent class analysis of roughly 30 different behaviors.…
Very strange Macbook pro behavior - Stata won't close, caught in endless save loopVery strange Macbook pro behavior - Stata won't close, caught in endless save loop https://drive.g…
Individual Cross sectional regressions by firm and obtaining residuals... Please help me...Hello Everyone! I am totally new to STATA, and I have a brief question about running individual cros…
Subscribe to:
Post Comments (Atom)
0 Response to How to calculate days and hours between two dates
Post a Comment