Return Actual Number of Working Days For a Specified Period

D

Darren Franklin

I wish to create a report that will determine the downtime
departments have had regarding their systems.

I have most of what is needed with the exception of the
number of days between date-a and date-b that excludes
Saturdays and Sundays.

I have seen vba code for this but the code is not relevant
in the criteria of a query. If I create a new field based
on DATEDIFF("d", [StartDate],[EndDate]), I get all the
days betwwen the two dates that includes Saturdays and
Sundays.

Please advise what on I have missed here.

Many Thanks
Darren
 
D

Dale Fye

If you are certain that the start and end dates are weekdays, and all
you are interested in is excluding weekends, not holidays, then you
should be able to use:

DateDiff("d", [StartDate], [EndDate]) - DateDiff("ww", [StartDate],
[Enddate]) * 2

If you are interested in excluding holidays as well, then I would
recommend some other technique.

--
HTH

Dale Fye


message I wish to create a report that will determine the downtime
departments have had regarding their systems.

I have most of what is needed with the exception of the
number of days between date-a and date-b that excludes
Saturdays and Sundays.

I have seen vba code for this but the code is not relevant
in the criteria of a query. If I create a new field based
on DATEDIFF("d", [StartDate],[EndDate]), I get all the
days betwwen the two dates that includes Saturdays and
Sundays.

Please advise what on I have missed here.

Many Thanks
Darren
 

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