Date: Thu, 24 May 2001 07:30:38 -0700
Reply-To: Pete Lund <pete.lund@NWCSR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Pete Lund <pete.lund@NWCSR.COM>
Subject: Re: subsetting by a date
In-Reply-To: <20010524101715.14585.00001916@ng-md1.aol.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Ellen-
If the date variable is a SAS date one possibility is to change your where
clause to reference the date in a date constant format. Something like:
where date le "13apr2001"d
The format of a date constant reference is "ddmmmyyyy"d, where dd is the
day, mmm is the month abbreviation and yyyy (or yy) is the year. Make sure
to enclose that part in quotes and follow with a 'd' (no quotes) to tell SAS
that it's a date.
----------------------------------------------------------------------------
---
Pete Lund
Northwest Crime and Social Research
313-D Fifth Ave SE
Olympia, WA 98501
(360) 528-8970 - voice
(360) 280-4892 - cell
(360) 570-7533 - fax
pete.lund@nwcsr.com
www.nwcsr.com
----------------------------------------------------------------------------
---
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of
EMRAIN
Sent: Thursday, May 24, 2001 7:17 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: subsetting by a date
Hi all,
I am looking for some help in subsetting a dataset based on a date. I need
to
keep all observations that are less than or equal to a certain date. I have
tried;
where date le 04/13/2001 and this doesnt work. Any thoughts?
Ellen