DateAdd ignoring Week-ends

  • Thread starter Thread starter Question Boy
  • Start date Start date
Q

Question Boy

Is there away to do a DateAdd but ignoring the week-ends?

Let say I use today as an example 02/19/2009 and I need to Add 18 hours. I
need it to add the hours assuming 8 hours = 1 day and ignoring the week-end.
As such it would return.

18/8=2.25 days ... so 3 days
20 = 1
21 ignore
22 ignore
23 = 2
24 = 3

so the answer returned would be 02/24/2009.

Thank you!

QB
 
Never had the pleasure of that, as I've never been in an industry that shut
down on weekends...and I wonder why I don't have a life.

I do know that the subject has come up often. Try googling for it.
 
I found a nice bit of code at the MVPs site but sadly it does not seem to
permit substraction (negative numbers) which I need.

Anyone have a bit of code that allows substration of dates ignoring week-end?
 
DateAdd() can be used to subtract days from a date by simply making the
interval negative.
 
Back
Top