DateAdd("w", 5, Date) Problem

P

Phill

I am trying to populate a date field with the date 5
working days from the current date. I thought DateAdd
("w", 5, Date) was how to do it, but it returns the date
5 calendar days instead. This is in an Access 2000 /
Windows XP Pro environment. Any ideas? Thanks
 
J

John Vinson

I am trying to populate a date field with the date 5
working days from the current date. I thought DateAdd
("w", 5, Date) was how to do it

Nope. Access doesn't know your corporate policies. Is your company in
the US, where Saturday and Sunday are off; or in Israel where Sunday
is a workday and Friday and Saturday are off? What state and national
holidays does your company observe?

You'll need to do this yourself, for instance using a Table of
workdays for the next x years. There are some code samples available -
check out http://www.mvps.org/access and search for "workday".
 

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