Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Tyler Frazier <tyfrazier@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: left right string |
Date | Tue, 18 May 2010 23:03:19 +0200 |
simple question, I hope -- I have a variable which is a range of ages, for example the variable name is hhh_age and the quantities are 15-19, 20-24, 25-39 etc... and I want to generate a new variable (age_min) that returns the left two characters from hhh_age , and another variable that generates the right two -- (age_max) I searched but couldnt find it, seems like a very simple thing, but cant figure it out. any help is greatly appreciated Ty * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/