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
xtscc error: "too many values r(134)";Hi, I am currently trying to estimate a Dynamic Panel Data Model (including a first-order lag of the…
XTIVREG: Fixed-effect model with IV robust or non-robust? IV choice and normal se assumptions for FEI am currently working on my thesis on the impact of land title certificate on crop diversity index …
"Standalone" Arellano-Bond autocorrelation test and Test for heteroscedasticity when using gmmHello everyone, I am new to the list and I hope I am able to keep the rules of good conduct here. I …
convert US 1990 census occupation codes to SEI Stata syntaxHello, I am converting US 1990 census occupation codes to SEI. I was wondering if anyone could share…
using gammap and gammafit to estimate moments based probability and cumulative density functionsHi all, I have been trying to estimate household-and-period-specific conditional well-being probabil…
Subscribe to:
Post Comments (Atom)
0 Response to How to calculate days and hours between two dates
Post a Comment