[thelist] vbscript: dateadd weekdays

Ken Schaefer Ken at adOpenStatic.com
Fri Apr 7 20:54:23 CDT 2006


: -----Original Message-----
: From: thelist-bounces at lists.evolt.org [mailto:thelist-
: bounces at lists.evolt.org] On Behalf Of Canfield, Joel
: Subject: Re: [thelist] vbscript: dateadd weekdays
:
: thanks for clarifying, Ken
: 
: > The documentation isn't clear about the
: > differences between
: > "d" and "w" (because there aren't any)
: 
: it does, though, say that 'd' means 'days' and 'w' means 'workdays',
: which, in my mind, implies a difference, whatever that might be.
: 
: So, is the only way to add working days (for me, that's Monday through
: Friday inclusive) to laboriously walk through the calendar using the
: Weekday function?

Um, no.

You know that every 7 days you have two weekend days.

All you need to know is:
a) How many days from the StartDate to the next Saturday
b) How many lots of 7 days there are between the next Saturday and your
EndDate
c) How many days between the Sunday and your end Date.

Cheers
Ken



More information about the thelist mailing list