[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Splitting a string variable
gen str newvar=substr(oldvar,1,4)
The above assumes that all data are like the one example you gave
Mosca, Ilaria wrote:
I am dealing with a string variable that has 4 figures and 2 letters,
something like this: 1234AB
As you can see there is no space, or comma, etc. divinding the figures
from the letters.
What I wanna do is to create a new variable where I only keep the
figures and drop the letters. How can I do that? Does the command SPLIT
help me in this?
Thank you very much.
* For searches and help try: