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 (July 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 1 Jul 2008 09:10:23 -0400
Reply-To:     Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:      Re: Selecting Observations by Date.
Comments: To: Karen smith <ponwtr@HOTMAIL.COM>
In-Reply-To:  <200807011241.m61AkIri002955@malibu.cc.uga.edu>
Content-Type: text/plain; charset="us-ascii"

Karen: Are you trying to subset a dataset that contains a SAS date variable (such as the DATEPART() of a time stamp)? If so, you should compare the value of the date variable (say, date) to the value of the DATE() function in a subsetting IF statement: data t1; set t0; IF date = DATE() -1; run; -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Karen smith Sent: Tuesday, July 01, 2008 8: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


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