datediff in bus. days

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
 
T

Tom Wickerath

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top