|Date: ||Fri, 9 Aug 2002 17:04:39 -0400|
|Reply-To: ||Mark Casazza <firstname.lastname@example.org>|
|Sender: ||"SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>|
|From: ||Mark Casazza <email@example.com>|
|Subject: ||Re: Selecting Cases Based on Date Range|
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
DATA LIST LIST/datevar(adate).
SELECT IF datevar LT date.mdy(7,1,2002).
*SELECT IF datevar LT 13244860800.
> -----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
> (813) 272-5625 x 336