There is an FAQ
How do I convert date variables into Stata elapsed dates
when the numbers run together, like 4151999?
at http://www.stata.com/support/faqs/data/dateseq.html
A canned solution is offered by -todate- on SSC.
Nick
[email protected]
[email protected]
> A simple question for which I've had trouble finding an answer:
>
> A file has a date variable without delimiters -
>
> 19930407
> 19911201
> 19971103
>
>
> I need to extract the first four digits as a new variable 'year'.
*
* 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/