Hello everyone,
I have a dataset that includes a date variable in the following format: M/D/YYYY.
With this dataset I am performing the following reshape commands:
In the second reshape command, unfortunately Stata changes the format of the date variable, so that I end up with variables named CategoryXXXXX, where XXXXX is a random combination of 5 numbers. What I would like to have is variables named CategoryMDYYYY.
Any ideas on where I am making a mistake or how I could specify the format that I want in my commands?
Thank you very much!
I have a dataset that includes a date variable in the following format: M/D/YYYY.
With this dataset I am performing the following reshape commands:
Code:
renvars, pref(Category) ren CategoryDate Date reshape long Category, i(Date) j(id) string reshape wide Category, i(id) j(Date) renvars Category*, pred(8)
Any ideas on where I am making a mistake or how I could specify the format that I want in my commands?
Thank you very much!
Comment