I imported .xlsx file to stata, realizing that year values (int) looks like
.
Then I destring the variable using
before deleting the part before 1981. But destring value turns out 8005, which is weird to me.
Is there any way to remove all the leading terms before 1981 so that my year value may look like just 1981?
Thanks.
Code:
01dec1981
Then I destring the variable using
Code:
destring year, gen(yr)
Is there any way to remove all the leading terms before 1981 so that my year value may look like just 1981?
Thanks.
Comment