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
Pieter Wijnen - 18 Oct 2007 11:06 GMT
see
http://www.datastrat.com/Code/GetBusinessDay.txt
Pieter
> 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.
[quoted text clipped - 10 lines]
>
> Thank you
John W. Vinson - 18 Oct 2007 19:44 GMT
>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]