[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: parsing a variable positionally

From   Rufus Peabody <>
Subject   st: parsing a variable positionally
Date   Tue, 3 Jun 2008 00:21:50 -0400

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?


* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index