BusinessDays ( startDate ; endDate )
Returns the number of business days between two dates (inclusive)
Average rating: 4.1 (38 votes) Log in to vote
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function returns the number of business days (non-holiday weekdays) between startDate and endDate (including both startDate and endDate).
This function is dependent on the BusinessHolidays ( calendarYear ) function to produce a list of observed holidays in a given year.
|Brian Rich, Hampshire UK
Feb 22, 2012
|Business Days() imposes a severe performance hit of several seconds if the startDate parameter is empty, and returns a ? as the result.
I added a case statement to a modified version of the function so that if the startDate or endDate are empty, or the endDate<startDate, the function returns a null value and doesn't try to evaluate - viz:
|Jeremy Bante, USA
Feb 22, 2012
|Thank you for letting me know. Normally I prefer to let the consequences of bad input filter through, but performance is different. I opted to return "?" rather than null to be consistent with error behavior for FileMaker-native functions.|
Nov 29, 2013
|can i have coding for buisness days function?|
Nov 12, 2018
|We have weekly holidays Friday and Saturday. Where I need to change the condition in this custom function ?. Please advise.|
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.