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 (April 2000, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 1 Apr 2000 06:15:52 GMT
Reply-To:     sashole@mediaone.net
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject:      Re: sub-setting by date format
Comments: To: sputnam@EIS.COM.EG
Content-Type: text/plain; format=flowed

Shan,

It's strange. It should have produces a char-to-num conversion note in the log, but worked, assuming that the date is indeed stored as a SAS date. In any case, though, using the YEAR function seems to be less contrived in this situation, as in

if mod(year(yourdate),100) = 99 then do; ............ end;

Kind regards, ==================== Paul M. Dorfman Jacksonville, Fl ====================

>From: Shan <sputnam@EIS.COM.EG> >Reply-To: Shan <sputnam@EIS.COM.EG> >To: SAS-L@LISTSERV.UGA.EDU >Subject: sub-setting by date format >Date: Sat, 1 Apr 2000 05:07:04 GMT > >I have a quick question about date formats >I have a yymmdd2. format that pulls the 'year' off. >I want to sub-set a dataset by a specific year. Something like this: >if year=99 then do; >. >end; >I've tried substr(var,1,2), but no good. >but it doesn't seem to work - any thoughts? >shan

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


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