Hi
I have a query my variable is in the following format: 1901m12, 1902m1 and so on.
I want to separate this and create a monthly variable where January=1, February=2 and so on. What is the command that I could use (This is a string variable)
The code I used is :
gen date1=monthly(date,"YM")
gen date2 = dofm(date1)
format date2 %d
But this is not getting the required results.
My data on the dataex command is as follows
[CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input int month
-697
-696
-695
-694
-693
-692
-691
-690
-689
-688
-687
-686
-685
-684
-683
-682
-681
-680
-679
-678
-677
-676
-675
-674