Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Substr not working anymore in Stata 10
From
Diego Canales <[email protected]>
To
[email protected]
Subject
st: Substr not working anymore in Stata 10
Date
Sun, 27 Mar 2011 02:25:36 -0700
Hi everyone,
I was just recently looking at the thread "Splitting string variables
without parse strings" and the command that works for this task, which
is the same problem I have, substr, doesn't seem to be working anymore
for Stata 10. If I type help substr, an explanation still appears, but
when I run the following:
gen hrs_inicio= substr (chorainici, 1,2)
Stata gives me a: substr not found.
chorainici is a 4 digit string variable, such as 1416, and I need the
first two digits in a new variable.
Thanks,
Diego
---------------------------------------------------------------
Diego Canales
Master of City Planning | MCP'11
University of California at Berkeley
*
* 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/