[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: date format
Dan,
Just use:
gen datenew=date( dateold, "YMD")
format datenew %td
If your date variable is not a string variable then run this (below)
first to convert it to a string:
tostring datesold, replace
Hope this helps,
Alex
Rodriguez, Dan (Prop) wrote:
Need to convert date format of YYYYMMDD into Stata date format. Does anyone have a short do-file to accomplish this?
Thank you,
Dan
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/