DateAdd function

G

Garnish

I'm trying to use the DateAdd function in a text box to add a specified
number of working days to a date stored in another text box.

I have typed:
=DateAdd("w",4,[Text24]) where Text24 contains the original date of
19/10/2007.

I get the result 23/10/2007 when I was expecting 25/10/2007 (4 working days
later).

Does anyone know where I am going wrong?

Thank you
 
J

John W. Vinson

Does anyone know where I am going wrong?

Just assuming that Microsoft knew what they were doing when they implemented
the "w" DateAdd operation. It's functionally identical to "d" and knows
nothing about weekends or holidays! See the link in Pieter's message; you'll
need some code and probably also a table of the business holidays that your
company observes.

John W. Vinson [MVP]
 
Top