Date Syntax

  • Thread starter Thread starter Donna Fuga
  • Start date Start date
D

Donna Fuga

How can I use the DateAdd and DateDiff functions in MS
Access to calculate business days and holidays? If I have
a date, and want to determine the deadline date for 10
business days from that date, what is the syntax that I
need to use? I know how to do a simple DateAdd or
DateDiff, but am not sure how to exclude weekends and
holidays. I searched the help screens and didn't find
anything other than NETWORKDAYS worksheet function. This
doesn't help, because it requires a start and end date to
return the net working days. I have the start date and
know the net working days, and am trying to determine the
end date (or, vice versa if I have the end date and want
to calculate back in time).
 
There is no built-in function. Best method that I've read about is to build
a table that contains all the dates that you want to exclude from such
calculations/considerations (holidays, weekends, etc.), and then write a
function that calculates the actual number of calendar days that are
represented by the date difference that you want (e.g., 10 business days).
It can be somewhat tricky....
 
I think the Microsoft Knowledge Base actually has some prewritten code that
you can use to do this. Also, the book Access 2000 Developer's Handbook, I
believe, has some prewritten code to do this also.
 
Thanks, G. I hadn't gone looking for code...just knew that there is no
built-in VBA function to do this.
 
Back
Top