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'.
Can you please help?
Thank you
Norm Christopher
*******************************************************************************************************************
This electronic mail transmission, including any attached files, may
contain confidential and/or privileged information for the sole use of the
intended recipient(s). It is not intended for transmission to, or receipt
by, any unauthorized parties. Any review, use, distribution, dissemination,
downloading, copying or disclosure by others is strictly prohibited. If you
are not the intended recipient (or authorized to receive information for
the intended recipient), you are hereby notified that you have received
this transmission in error. If you have received this transmission in
error, please delete it, as well as any copies, from your system without
copying it, and notify the sender by reply e-mail.
*
* 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/