This function returns the number of work days between the given dates.
NetWorkDaysCustom([StartDate],[EndDate],[WeekendValue],[Holidays])
StartDate is the date to start counting the work days from.
EndDate is the date to count the work days to.
WeekendValue is a number (from the chart below) that represents the days to count as weekend days.
Holidays are the dates to exclude from the returned number of work days.
Dates can be specified as text strings, e.g. "10/08/2010". They are converted to dates using the system regional settings. On a US system "10/08/2010" would result in the 8th of October, however, on a UK system, the same string will result in the 10th of August.
When creating projects that work in countries with different regional settings, it's recommended to use the format "YYYY-MM-DD", e.g. "2010-08-10". Dates in this form will always be understood the same way on all systems.
Weekend Value | Weekend Days |
---|---|
1 or Omitted | Saturday, Sunday |
2 | Sunday, Monday |
3 | Monday, Tuesday |
4 | Tuesday, Wednesday |
5 | Wednesday, Thursday |
6 | Thursday, Friday |
7 | Friday, Saturday |
11 | Sunday only |
12 | Monday only |
13 | Tuesday only |
14 | Wednesday only |
15 | Thursday only |
16 | Friday only |
17 | Saturday only |
Rule | Meaning |
---|---|
NetWorkDaysCustom("10/08/2010","10/30/2010",3,"10/12/2010") | This will count all the work days in between 10/08/2010 and 10/30/2010, taking Monday and Tuesdays as weekend days (3), but exclude the day of 10/12/2010 and will return 17. |