How to calculate working days in a query in MS Access

LillyC
LillyC used Ask the Experts™
on
Does anyone know how  I can create a query to calculate the number of working days from between two dates?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ste5anSenior Developer

Commented:
When using such functions/calculations in a larger environment (company), across multiple areas with different holidays, then the only approach is the simple approach:

Use a prefilled calendar table and mark the work days.
Most Valuable Expert 2015
Distinguished Expert 2018

Commented:
A little search will reveal many solutions, also:

Networkdays

And Rey is passing by!
Database Developer
Commented:
Thanks for your help, I've just worked around it by using DateDiff to identify the number of days between the two dates, then divided it by 7 and multiplied it by the number of days the employee works, to get their working days in that period.
ste5anSenior Developer

Commented:
hmm, I guess it depends on the place you're livening. We have in Bavaria already three different calendars for holidays depending on the city (Augsburg - an additional peace festival for the peace treaty after the 30 years war, and depending on the majority of either Catholics or Protestants).. ;)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial