M mbmccoy Nov 17, 2004 #1 Using Access 2003, how do I calculate the interval between two dates in business days and not straight calendar days.
Using Access 2003, how do I calculate the interval between two dates in business days and not straight calendar days.
G Graham R Seach Nov 20, 2004 #3 'Number of weekdays between two dates (by Doug Steele MVP) myInt = 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)) Regards, Graham R Seach Microsoft Access MVP Sydney, Australia
'Number of weekdays between two dates (by Doug Steele MVP) myInt = 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)) Regards, Graham R Seach Microsoft Access MVP Sydney, Australia