CalcDaysBetween ( startDate ; endDate ; numDays ; $$HolidayList ; countWeekends ; returnNeg )
Rate this function: Average rating: 3.3 (9 votes) Discuss this Custom Function
Shan Younker, Shan Younker
none
Calculates number of days between dates, accounts for holidays and weekends
Sample Input:
| CalcDaysBetween ( 7/1/2009 , 7/9/2009, 0, $$Holidays, False, "" ) |
|
Sample Output:
|
Description:
Calculates the number of days between two dates. Will not count holidays or weekends if passed a variable with a list of holidays.
When you initially call the function, pass a start and end date. Use 0 for numDays - this gets incremented each time through the loop. Pass a pre-populated list of holidays from a variable. CountWeekends - pass 'true' if you want to count weekends and holidays in numDays, pass 'false' if you don't. For returnNeg, pass "" when calling the function, if the startDate is after the endDate then the function will return a negative number for numDays.
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:
|
Newest Custom Functions:
| 1. |
GeoBox(latitude;longitude; radius) |
| |
(Mon, Mar 15, 11:04am) |
| 2. |
MonthNameList ( start; number; short ) |
| |
(Sun, Mar 14, 11:45pm) |
| 3. |
matchListAB( ListA ; ListB; match_Value; match_operator ; getN ) |
| |
(Sun, Mar 14, 10:29pm) |
| 4. |
Bin2Hex ( binary ) |
| |
(Sat, Mar 13, 10:08pm) |
| 5. |
SlideView (text) |
| |
(Sat, Mar 13, 8:40pm) |
| 6. |
HashFNV1a64 ( text ; empty ) |
| |
(Sat, Mar 13, 6:23pm) |
| 7. |
HashFNV1a32 ( text ; empty ) |
| |
(Sat, Mar 13, 5:55pm) |
| 8. |
XORbin( bin0 ; bin1 ; "" ) |
| |
(Sat, Mar 13, 4:35pm) |
 |
|
What do the other four "param's" do? I haven't looked at the code $$Holidays is obvious, but the others?
Roger, New Zealand
May 07, 2009 5:55pm