Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / October 2007

Tip: Looking for answers? Try searching our database.

DateAdd function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Garnish - 18 Oct 2007 09:48 GMT
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]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.