[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: parsing a variable positionally
Hey all,
I'm trying to convert a variable into a date. Ordinarily, this would
be simple using Stata's date() functions, but one of my variables
contains both month and date (i.e. 403 is April 3rd), while another
contains year. I'm trying to split the month+date variable into two
variables by parsing after the first character. I tried converting
the variable to a string and using the "split" command, but it does
not allow me to parse positionally; it merely allows me to specify a
parsing character. Is there a way to parse by position?
Thanks,
Rufus
*
* 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/