Date: Wed, 19 Feb 1997 09:39:54 -0600
Reply-To: "Alspach, Steve" <alspach@SPSS.COM>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: "Alspach, Steve" <alspach@SPSS.COM>
Subject: Re: using $date in spss 6.1.4 for Win
Try the following syntax:
COMPUTE age=ctime.days($time-dob)/365.25.
EXECUTE.
The $TIME variable contains the same information as the $DATE
variable, but also includes the time of day.
Steve Alspach
SPSS Technical Support
>----------
>From: Michael McStephen[SMTP:PSYMDM@LURE.LATROBE.EDU.AU]
>Sent: Tuesday, February 18, 1997 8:57 PM
>To: Multiple recipients of list SPSSX-L
>Subject: using $date in spss 6.1.4 for Win
>
>Hi,
>
>I'm trying to use the system date variable $date to compute current
>ages of subjects. The version of SPSS I'm using is 6.1.4 for Windows.
>The syntax I'm trying to use is:
>
>compute age = $date - dob.
>execute.
>
>where dob is a variable with the format dd-mmm-yyyy.
>
>This is not working and I get the message that one of my operands is
>not numeric. I understood that $date had the format dd-mmm-yyyy by
>default.
>
>The above syntax works fine using another dd-mmm-yyyy variable instead
>of $date.
>
>Any suggestions?
>
>Thanks,
>
>Michael.
>
|