|
|
At 07:27 PM 6/7/2007, Scott Collier wrote:
>I have a column of Case ID's that were assigned using a combination of
>letters(6) and numbers(121174). The cells look like this HUDBET121174.
>[...] I just want the cell HUDBET121174 to be displayed as 121174.
Not tested, but something like these:
A. If it's really always 6 letters, then 6 digits:
STRING BDstring (A6).
COMPUTE BDstring = SUBSTR(CaseID,7).
B. If the number of letters before the digits can vary. (I'm allowing
for at most 8 digits):
STRING BDstring (A8).
COMPUTE #FrstDig = INDEX(CaseID,'0123456789',1).
COMPUTE BDstring = SUBSTR(CaseID,#FrstDig).
Since you're extracting a birthdate, you may want to make it an SPSS
date variable rather than a string, but that's another story.
|