Date: Wed, 2 Nov 2005 12:01:26 -0800
Reply-To: Kathy Marshall <KMarshall@chp.ca.gov>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Kathy Marshall <KMarshall@chp.ca.gov>
Subject: Transformation Question
Content-Type: text/plain; charset=US-ASCII
I would like to transform a 5-digit variable called "exam" into a 2-digit variable called "year." The third and fourth digits of exam equal the year.
For example:
Exam = Year
41041 2004
50994 1999
81001 2000
31052 2005
I have not been successful in getting LPAD or LTRIM to perform this simple transformation. Would you please help me with specific syntax that would accomplish my goal?
Thanks so much.
|