Hi everyone. I am a STATA beginner trying to calculate a time span. I have one variable “in” with date and time for example: 1/1/2021 10:00 (format %tcnn/dd/ccYY_hh:MM). I also have a variable “out” for example: 2/2/2021 12:00. I would like to calculate how many days it is between “in” and “out”. I tried datediff(in, out, day[,1mar]) but it does not work.
Any suggestions?
All the best!
Related Posts with Timespan
Including additional interaction fixed effects wHi Statalist, I just joined the community and I would like to ask a question that I couldn’t solve …
Does "reverse" retain as official word?Dear Stata users, I installed a community contributed command -revrs- (SSC) written by Kyle Longest…
Accessing the coefficient estimate in a threshold regressionHi, I need your help. When we run a simple regression, we may access the coefficient by typing Cod…
Including additional interaction fixed effects in a two way fixed effect modelHi Statalist, I just joined the community and I would like to ask a question that I couldn’t solve …
Tabulating or listing distinct values for multiple variablesHi, I want to tabulate or list the distinct or unique values of "stcode" and "avg" variables. The d…
Subscribe to:
Post Comments (Atom)
0 Response to Timespan
Post a Comment