[thelist] vbscript: dateadd weekdays

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Fri Apr 7 13:07:28 CDT 2006


> 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?

   More or less, yes... BUT if you're worried about performance on long loops, you could verify your current position in the week and then add (WeekDaysToAdd/5)*7 or something like that.

Just a half-formed thought...

Peter

 From: "Canfield, Joel" JCanfield at PacAdvantage.org

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?

spinhead



More information about the thelist mailing list