Link to home
Start Free TrialLog in
Avatar of mandelia
mandeliaFlag for India

asked on

Need a query to exclude weekends.

Greetings Experts,
 we can check weekdays by the keyword weekday in the query.
I need a Query in access that does the following:
I have two dates. d1 and d2 in a table a.
So the query should return me the weekdays between two dates. ie it should exclude the weekends.

Fo if d1 = 09/08/2007 and d2 = 01/08/2007
then i should get 6 and not 8

if d1 = 06/07/2007 and d2 = 16/07/2007
i should return 6 and not 10
Avatar of Barry Cunney
Barry Cunney
Flag of Ireland image

DateDiff ( "w", date1, date2, [firstdayofweek], [firstweekofyear])
Avatar of mandelia

ASKER

In the scenario above what should be [firstdayofweek], [firstweekofyear]
ASKER CERTIFIED SOLUTION
Avatar of Barry Cunney
Barry Cunney
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial