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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top