Date: Wed, 30 Oct 2002 10:52:57 -0600
Reply-To: phil busby <fransioli@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: phil busby <fransioli@HOTMAIL.COM>
Subject: Last Friday of the month
Content-Type: text/plain; format=flowed
Date: Wed, 30 Oct 2002 03:00:52 -0800
From: Stig Eide <stigeide@YAHOO.COM
Subject: HOWTO find last Friday of month?
Does anyone have a tip of how to find the last Friday of a month?
The last day of the month can be found with the INTNX function:
lastDay=intnx('month',today(),0,'E');
This gives the SAS date value of the last day of the current month.
Anyone have a suggestion? Thanks! Stig Eide
do lastfri = intnx('month',today(),1)-1
to intnx('month',today(),1)-7
by -1 while(weekday(lastfri) ne 6);
end;
_________________________________________________________________
Get a speedy connection with MSN Broadband. Join now!
http://resourcecenter.msn.com/access/plans/freeactivation.asp
|