Date: Thu, 18 Jan 2007 11:12:14 -0500
Reply-To: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Subject: Re: # WEEKdays between two SAS dates
On Thu, 18 Jan 2007 10:58:59 -0500, Howard Alper <halper@HEALTH.NYC.GOV>
wrote:
>Hi,
>
> I'm trying to calculate the number of weekdays (Monday, Tuesday,
>Wednesday, Thursday, and Friday) between two SAS dates. I know of
>functions like YRDIF and DATDIF, but these don't seem to have the option of
>calculating only weekdays. Does SAS have a function for this? If not, how
>might such a difference be calculated?
>
> Thanks in advance,
>
> Howard Alper
Excluding the weekend is easy as Toby has shown but you may find it a
greater challenge to account for Holidays assuming that is is a concern as
well.
Venky Chakravarthy
|