Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: separating components of a string variable


From   Mahbubeh Parsaeian <mahbobehparsaeian@yahoo.com>
To   ";" <statalist@hsphsun2.harvard.edu>
Subject   st: separating components of a string variable
Date   Mon, 1 Oct 2012 12:32:14 -0700 (PDT)

Hi everybody.
I have a question about separating the component of a string variable. 
Suppose you have a string variable which is an id variable and consists of 9 numbers. The second and third numbers introduce the province and you want
to separate this part of the string variable and save it as a new
variable.
I also have another question. I have an id number such as 123456 and I want
to separate 3 numbers from the right side (456).
Would you please help me to find good solutions for these questions?
Thanks for your attention. 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index