Hello,
I am attempting to turn a string value "2020-2021" into a date value. Nothing I am doing is actually working, its only returning 4.490e+21 as the output. I have attached the code below:
gen date2=date("2020-2021", "YY")
format date2 %ty
display date2
I understand that the issue may lie in STATA using a reference date in 1960 for the date() function. I have no idea how to mediate this.
Related Posts with Working with dates
Instrument as control variable for main hypothesis in earlier section of a paper, when 2SLS only used in later sectionDear Statalist Community, I was wondering about good practice in economcetric research, in particul…
Conformability error, r(503)Hi everyone, I have a problem when I want to input a matrix in Stata. First I local some results and…
evealuating balance after eteffectsHello all, Is there a reason why tebalance summarize is not available after eteffects? Is this beca…
Industry fixed effects in a dynamic panelHi, I want to include the industry fixed effects in a dynamic panel model based on the 2 digit sic …
Conformability error, r(503)Hi everyone, I have a problem when I want to input a matrix in Stata. First I local some results and…
Subscribe to:
Post Comments (Atom)
0 Response to Working with dates
Post a Comment