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
Interaction term in a quadratic modelMy basic cross-sectional (countrywise) model is based on regress life_exp gdp_pc_ppp sq_gdp_pc_ppp N…
Exporting Oster bound estimatesDear all, As a robustness check, I'm computing the Oster bounds on unobservables for a range of out…
Creating Variable based on NAIC Digit Level match for FirmsI have a list of firms that I am comparing to each other. Next I want to compare the NAIC code of ea…
Autocorrelation and other assumptions Diff in Diff modelHello, I am working on the following Diff in diff model: ln_sales = b0 + b1*treatment + b2*(treat…
Filtering out cases in panel dataHi all, I am working with panel data and I need some helping filtering out the cases I can use. Eve…
Subscribe to:
Post Comments (Atom)
0 Response to Timespan
Post a Comment