Return Actual Number of Working Days For a Specified Period

  • Thread starter Thread starter Darren Franklin
  • Start date Start date
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
 
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
 
Back
Top