Date: Mon, 9 Jun 1997 11:58:24 -0600
Reply-To: "White, Robin HSURC" <WhiteR@SDH.SK.CA>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: "White, Robin HSURC" <WhiteR@SDH.SK.CA>
Subject: Help: Concatenate and/or date functions
Content-Type: text/plain; charset="iso-8859-1"
Hi:
I can't find an example of the concatenate function but I'm sure it's
the one I want.
The problem:
I've been given a numeric birthdate in the form: YYYYMM and I need to
somehow create a new variable in the form: MMYYYY.
Why?
To my knowledge I can't simply transform the YYYYMM birthdate into a
date field since SPSS aggregation functions don't include yyyymm. Spss
does, however, have a mmyyyy date format.
My idea:
My thought was to create a new variable containing the last 2 columns of
birthdate (MM) followed by the first 4 columns of birthdate (YYYY).
Once I had this new variable (MMYYYY) I could then compute a date using
the DATE.MOYR(m,y) function.
To do this, I thought I would convert the numeric birthdate variable
into a string variable so that I could use the concatenate function to
create the new variable (in the form MMYYYY).
But:
I can't find seem to get the form of the concatenate function right and
can't find any examples in help or the SPSS manual. And at this point,
I'm not 100% percent sure that the concatenate function can do what I'm
hoping it can do.
I would appreciate any help re: the concatenate function or any other
possible solution to this problem.
Many Thanks!
Robin White
Research Officer
HSURC