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.
0 Response to Working with dates
Post a Comment