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 (January 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: Howard Alper <halper@HEALTH.NYC.GOV>

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


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