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 (August 2002)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 9 Aug 2002 17:04:39 -0400
Reply-To:   Mark Casazza <mark.casazza@verizon.net>
Sender:   "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:   Mark Casazza <mark.casazza@verizon.net>
Subject:   Re: Selecting Cases Based on Date Range
Comments:   To: Kurt Wilkening <WilkeningK@hillsboroughcounty.org>
In-Reply-To:   <sd53e474.070@GroupWise>

Hi Kurt,

Dates in SPSS are stored as the number of seconds since October 14, 1582 so July 1, 2002 is actually 13244860800. If you select for dates less than this number you'll get what you are expecting. The other way is to tell SPSS that what you are giving it as selection criteria is a date and to have it do the transformation. The following two examples produce the same selection.

BTW, you can't have a variable named "seniority" since that is nine characters and SPSS only accepts eight. If that is what you typed as a command you may have other typos in the syntax which could be producing unexpected results.

Mark

-- DATA LIST LIST/datevar(adate). BEGIN DATA. 04/19/1995 01/02/1982 03/04/1991 06/30/2002 07/01/2002 END DATA. LIST.

SELECT IF datevar LT date.mdy(7,1,2002). LIST.

*SELECT IF datevar LT 13244860800. *LIST. --

> -----Original Message----- > From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] > On Behalf Of Kurt Wilkening > Sent: Friday, August 09, 2002 3:49 PM > To: SPSSX-L@LISTSERV.UGA.EDU > Subject: Selecting Cases Based on Date Range > > > Not sure what I'm doing wrong. I have a variable called > seniority which is formatted as mm/dd/yyyy. > > I go to select if seniority < 07/01/2002 but all the cases > are deselected. > > What gives? > > > > Kurt Wilkening > Personnel Research Manager > Hillsborough County Civil Service Office > 601 E. Kennedy Blvd., 17th Floor > Tampa, Florida 33602 > http://www.hccsb.org > (813) 272-5625 x 336 >


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