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
0 Response to How to calculate days and hours between two dates
Post a Comment