Hello, I'm using -todate- to convert string dates (yyyymmdd) to Stata dates.
The following reproducible code generates a date of "12 May 206", which is puzzling given that the original string date (20060511) specifies year 2006.
This happens whether or not I use the -destring- command. I'd very much appreciate any feedback or advice.
The following reproducible code generates a date of "12 May 206", which is puzzling given that the original string date (20060511) specifies year 2006.
HTML Code:
clear set obs 2 input date 20060511 20131213 destring date, replace format date %10.0g todate date, gen(new_date) p(yyyymmdd) f(%dd_m_cy) l