How to create a Script to calculate number of days between two dates (exclude weekends & holidays)?

I need to be able to calculate the number of working days between two dates determined in “Start Date” and “End Date” columns. I know the DATETIME_DIFF formula exists, but it includes weekends and public holidays – I need only working days to be calculated.

Is this something that can be achieved with a Script block?

Well if you don’t want to use DATETIME_DIFF(...) why not just use WORKDAY_DIFF(startDate, endDate, [holidays]).

WORKDAY_DIFF() doesn’t include weekends and you can specify which holidays to exclude.


Thanks very much! I didn’t realize this function existed, haha :sweat_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.