Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Count work days in a month

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EPratt - 17 Nov 2005 14:18 GMT
Has anyone written a formula that counts the number of work days (mon-fri) in
a given month?
John Spencer - 17 Nov 2005 16:50 GMT
Doug Steele posted this example for two dates.
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

That doesn't account for days that are holidays.

Hope this gets you started.

> Has anyone written a formula that counts the number of work days (mon-fri)
> in
> a given month?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.