date
12/12/08
12/02/08
04/14/08
04/04/08
I wrote the following code to convert to Stata date:
gen str date_year = substr(date, -2,.)
gen str date_month = substr(date, 1, 2)
gen str date_day = substr(date, 4, 2)
destring date_year date_month date_day, replace
list date date_month date_day date_year
However, when I import the *.csv file, the leading zeroes are dropped
from months 1-9.
Is there a way to solve this in Stata, without having to create
separate columns for m, d, and y in Excel?
*********