Date: Fri, 20 Apr 2007 09:50:49 -0400
Reply-To: Jack Clark <JClark@CHPDM.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <JClark@CHPDM.UMBC.EDU>
Subject: Re: date range?
In-Reply-To: A<1177076300.694214.274580@y5g2000hsa.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"
Celia,
You can use the between operator. This example assumes TESTDT is a SAS
date variable containing your date of interest.
Data xxxxx;
set yyyyy (where=(testdt not between '04JAN07'd and '11JAN07'd));
run;
Jack Clark
Research Analyst
Center for Health Program Development and Management
University of Maryland, Baltimore County
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
celiacai@GMAIL.COM
Sent: Friday, April 20, 2007 9:38 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: date range?
Hi,
How can I exclude a range of dates from the dataset in a data step
(maybe sql too)? Say, I want to exclude the week of 9/11/2001? I know
the 'date'd, but seems no way to specify a range/interval of dates.
celia
|