Date: Tue, 1 Jul 2008 06:55:56 -0600
Reply-To: Alan Churchill <savian001@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alan Churchill <savian001@GMAIL.COM>
Subject: Re: Selecting Observations by Date.
In-Reply-To: <200807011241.m61AkIri002955@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"
If Yesterday lt Today; <--- Always resolves to true meaning that it serves
no purpose.
I don't see your date variable for the data itself. Say you have a variable
called var1 in the dataset which is a date value, use a line like this:
If (var1 lt date()) ;
Alan
Alan Churchill
Savian
www.savian.net
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Karen
smith
Sent: Tuesday, July 01, 2008 6:42 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Selecting Observations by Date.
Hello, All.
I run a job everyday, and I only want obs. from the previous day. I do not
want to have to change the day every day, so I tried this:
CODE:
Today = Date();
Yesterday = Today - 1;
If Yesterday lt Today;
put @30 today @40 yesterday ;
17714 17713
Why didn't the above code select obs for June 30th.? There are obs. for
that day.
Thanks In Advance