Hi all:
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
However, what i found so far generate data like this: "1816m1". This is the code:
Code:
gen modate = ym(year, month) 
format modate %tm
Can anyone help me on this? Thanks in advance.
Best
Jiong
------------------