Date: Thu, 5 Jan 2006 07:26:09 -0800
Reply-To: Nico Peruzzi <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Nico Peruzzi <firstname.lastname@example.org>
Subject: Re: Date syntax
Content-Type: text/plain; charset=ISO-8859-1
This might not be the most graceful way, but it should work.
Create a variable in your dataset called RefDate, and copy and paste in
Run this syntax:
COMPUTE outcome = DATEDIFF(RefDate,DOB,"years") .
"outcome" is the new variable that will be created, in years. DOB is your
birth date variable.
The syntax takes the differece, in years, between the reference date and the
Hope that helps, Nico
On 1/5/06, Ralph Grubb <RalphG2703@aol.com> wrote:
> Does anyone have syntax that converts a date of birth (DOB) to a reference
> date, e.g., November 15, 2005? My DOB data are in this form
> YYYY/MM/DD. For
> Preferably I would like the calculated age or result in decimal form i.e.,
> Thanks in advance. Paula
Nico Peruzzi, Ph.D.