i hope all of you have wonderful holidays!. I have a question about generating year-month data. below is the sample. the first column is year and the second column is month. i want to generate year-month data like 181601, or 181612.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear year month 1816 1 1816 2 1816 3 1816 4 1816 5 1816 6 1816 7 1816 8 1816 9 1816 10 1816 11 1816 12 end
Code:
gen modate = ym(year, month) format modate %tm
Best
Jiong
------------------
0 Response to year month date
Post a Comment