I can't say for sure that these will work. I pulled it from an archive of
tips and tricks and have not tested either of the two functions.
'============================================================
' function by Klatuu
' Weekdays (no adjustment for holidays)
'============================================================
Function CalcWorkDays(dtmStart As Date, dtmEnd As Date) As Integer
CalcWorkDays = DateDiff("d", dtmStart, dtmEnd) - _
(DateDiff("ww", dtmStart, dtmEnd, 7) + _
DateDiff("ww", dtmStart, dtmEnd, 1)) + 1
End Function
'===========================================================
' Doug Steele
' Weekdays (no adjustment for holidays)
'===========================================================
SQL Statement:
'Number of weekdays between two dates, by Doug Steele MVP
SELECT DateDiff("d", dte1, dte2) -
DateDiff("ww", dte1, dte2, 1) * 2 -
IIf(Weekday(dte2, 1) = 7,
IIf(Weekday(dte1, 1) = 7, 0, 1),
IIf(Weekday(dte1, 1) = 7, -1, 0)) As WeekdaysBetween2Dates
FROM tblMyTable
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County