Hi
I have dates like this 1997m7 (formatted as %tm). Now I would like to get the year and the month in seperate columns. I tried this by using
The problem is that the generated numbers are not correct. E.g. for 1997m7 Stata generates year=1961 and month=3.
What can I do about this?
Thanks
I have dates like this 1997m7 (formatted as %tm). Now I would like to get the year and the month in seperate columns. I tried this by using
Code:
gen year=year(date) gen month=month(date)
What can I do about this?
Thanks
Comment