AddWorkDays ( startdate ; workdays ; daystoadd )
Add workdays or schedule-days to a certain startdate
Be the first to rate this function Log in to vote
Menno van Beek - Show more from this author
Van Beek Zakelijke Software https://www.vbzs.nl |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Add workdays to a date by skipping non-work days. The workdays of a week can be set in the second parameter or left empty, an illegal entry will cause the function not to calculate a new date.
So a few examples:
AddWorkDays ( Date ( 1 ; 4 ; 2022 ) ; "0111110" ; 5 ) = 01/11/2022 /* Workdays: mo-fr */
AddWorkDays ( Date ( 1 ; 4 ; 2022 ) ; "0111100" ; 5 ) = 01/12/2022 /* Workdays: mo-th */
Faulty input:
AddWorkDays ( Date ( 1 ; 4 ; 2022 ) ; "01100" ; 5 ) = 01/04/2022 .... No days are added, because string of workdays is incorrect.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.