Date: Sat, 1 Apr 2000 06:15:52 GMT
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject: Re: sub-setting by date format
Content-Type: text/plain; format=flowed
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;
Paul M. Dorfman
>From: Shan <sputnam@EIS.COM.EG>
>Reply-To: Shan <sputnam@EIS.COM.EG>
>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;
>I've tried substr(var,1,2), but no good.
>but it doesn't seem to work - any thoughts?
Get Your Private, Free Email at http://www.hotmail.com