I'm creating a set of 5 date variables to calculate age of my study participants. The 5 variables corresponding to the years 1982, 1989, 1999, 2009 & 2015. Day & month are missing, so these five variables will only have the year.
For the first one, in 1982:
Code:
gen year36 = 1982 br ID year36 gen date36=year(year36) format date36 %ty
Could someone help me?
Thanks
/Amal
0 Response to Creating a year variable
Post a Comment