datediff in bus. days

  • Thread starter Thread starter mission2java
  • Start date Start date
M

mission2java

Can I get the difference of days between two dates as business days?

Meaning I want to exclude saturdays and sundays from a date diff.

So if I did datediff from Jan 1 - Jan 8 it would not include th
saturday and sunday and only return 6 regular day
 
Yes, see either of the following samples:

Calculate Number of Working Days
http://www.mvps.org/access/datetime/date0006.htm

or

Doing WorkDay Math in VBA
http://www.mvps.org/access/datetime/date0012.htm

The first example is easier to set up, but it does not account for holidays. The second example
(Public Function dhCountWorkdaysA) can be used to account for weekends, and holidays that are
loaded into an array. You can store the holiday dates in a table, and use those records to
populate the array.

Tom
________________________________________


Can I get the difference of days between two dates as business days?

Meaning I want to exclude saturdays and sundays from a date diff.

So if I did datediff from Jan 1 - Jan 8 it would not include the
saturday and sunday and only return 6 regular days
 
Back
Top