LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2007)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 29 Jun 2007 08:17:53 -0500
Reply-To:   Melissa Ives <mives@chestnut.org>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Melissa Ives <mives@chestnut.org>
Subject:   Re: Quick solution for a date problem?
Comments:   To: KEVIN MANNING <kmannin4@jhmi.edu>
Content-Type:   text/plain; charset="us-ascii"

So how about just adding the 100 years? In the syntax below, it prevents adding 100 years to any date that is more than 1/1/1908 (you could use any date that makes sense with your data.

if (testdt<date.mdy(1,1,1908)) testdt=datesum(testdt,100,"YEAR").

Melissa

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of KEVIN MANNING Sent: Friday, June 29, 2007 7:30 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: [SPSSX-L] Quick solution for a date problem?

Thank you. Unfortunately, I do not have any additional syntax or output; this data was entered by a student of a colleague (and the student is no longer here). So I am not sure if the student actually entered the dates "1902" (all four digits) or what, but the dates should range from 1998-2002. We have checked the options for the century as you have specified, no luck. Regardless, thanks for your help. Kevin

----- Original Message ----- From: Richard Ristow <wrristow@mindspring.com> Date: Thursday, June 28, 2007 10:16 pm Subject: Re: Quick solution for a date problem? To: KEVIN MANNING <kmannin4@jhmi.edu>, SPSSX-L@LISTSERV.UGA.EDU Cc: "Oliver, Richard" <roliver@spss.com>, Melissa Ives <mives@chestnut.org>

> At 03:48 PM 6/28/2007, KEVIN MANNING wrote: > > >Date is entered as a variable as dd/mm/yyyy, but for some reason the > > >dates for 2000+ are reading as dd/mm/1901, dd/mm/1902, ...instead of > > >dd/mm/2001, so on. Anyone know of an easy way to fix this problem? > > See Richard Oliver's reply, but you can see that he's a bit mystified, > > too. > > As general advice: When you aren't getting the result you want, it > helps if you can give us the exact syntax that seems not to be > working; some test data, with some input you passed to the syntax; and

> the output from that data and the syntax, with any error or warning > messages exactly as they were printed. And, what output you wanted > instead of the output you got. > > The more we know, the more we can help. And debugging is like > proofreading, or medical diagnosis: It's the details, and the exact > information, that matter. > > -Good luck, and by all means give us a follow-up post, > Richard

PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance.


Back to: Top of message | Previous page | Main SPSSX-L page