So, I have month (only two values 06 & 12) and year variables.
I want to create a date variable that should look like this: Jun2009, Dec2009, Jun2010, Dec2010 and so on.
However, it generates date values that look like:
I appreciate your help. Thanks.
I want to create a date variable that should look like this: Jun2009, Dec2009, Jun2010, Dec2010 and so on.
Code:
gen strMonth = string(month, "%02.0f") gen strYear = string(year) gen strDate = strMonth + "/" + strYear gen date = monthly(strDate, "MY") format date %td
Code:
2009m6
Comment