you can try with the string function -substr-
Hope this helps!
Fabio.
At 16.18 17/09/2003 +0200, you wrote:
how do i get the date (year only) from a string variable that look
like dd/mm/yyyy.
thanks in advance.
--
Malak B Bokhari, MD MPH
Unit of Descriptive Epidemiology
IARC
Lyon, France
www.gulfoncology.org
*
* 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/
Fabio Berton
LABORatorio Riccardo Revelli - Center for Employment Studies
via Real Collegio, 30
10024 Moncalieri (TO)
em: [email protected]
web: www.labor-torino.it
Phone: +39 011 640 2659/2660
Fax: +39 011 647 9643
*
* 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/