I have dates in the format: 12FEB1993:00:00:00.000 and would like to have a variable with just 12FEB1993 and, ultimately, 1993Q1. The step I am struggling with is just getting the date extracted from the DateTime value. I've read the help documentation and various discussions on this site but, when I use the suggested syntax (i.e. gen double time = monthly(date_start, "MDY"), the variable populates as all missing values.
. gen right = monthly(date_start, "MDY")
(310,401 missing values generated)
I'm thinking that there is a chance that Stata isn't reading the original string as a date variable or there is some step that should be conducted prior that I have been missing. Any help would be much appreciated.
. gen right = monthly(date_start, "MDY")
(310,401 missing values generated)
I'm thinking that there is a chance that Stata isn't reading the original string as a date variable or there is some step that should be conducted prior that I have been missing. Any help would be much appreciated.