My date variable is of the form
I want to convert it to Stata form that is something like 31Jan2001. So I can create month variables and year variables like m=month(date), y=year(date)
So I tried to convert it using generate
But it doesnt seem to work. Gives me an error saying type mismatch.
Code:
date 20010131 20010131 20010131 20010131
So I tried to convert it using generate
Code:
statadate=date(date,"YMD")
Comment