Workday Count between [Startdate] & [Enddate]

P

Pete

Hi

Trying to count the number of Workdays only between 2 dates. [Startdate] &
[Enddate] can anyone help please.

Cheers
Sarah
 
K

KARL DEWEY

This will give you the workdays excluding the weekends and holidays.
Create a table name CountNumber with number field named CountNUM containing
zero through 100. Create a Holidays table with dates. You can join this
query in your totals query.


SELECT Date()-[CountNUM] AS [My Dates]
FROM CountNumber
WHERE (((Weekday(Date()-[CountNUM])) Between 2 And 6))
GROUP BY Date()-[CountNUM]
ORDER BY Date()-[CountNUM] DESC;

SELECT [Past workdays].[My Dates]
FROM [Past workdays] LEFT JOIN Holidays ON [Past workdays].[My Dates] =
Holidays.Holiday
WHERE ((([Past workdays].[My Dates]) Between [Enter start] And [Enter end])
AND ((Holidays.Holiday) Is Null))
ORDER BY [Past workdays].[My Dates] DESC;
 
Top