WORKDAYS_BETWEEN
Applies to: CELONIS 4.0 CELONIS 4.2 CELONIS 4.3 CELONIS 4.4 CELONIS 4.5 CELONIS 4.6
Description
This function calculates working days between two dates based on a TFACS style calendar table.
The calendar table can be configured in the Data Model Editor and applies to all calls of WORKDAYS_BETWEEN in the Data Model.
The calendar table has to have the following layout:
Calendar ID: Identifier of the working calendar
Year: Year of the calendar
Month 1: Working days of January bit encoded. 1 is a working day. 0 is a day off. Example of January 2019 with the weekends off: 1111001111100111110011111001111
Month 2: Working days of February.
...
Month 12: Working days of December
WORKDAYS_BETWEEN ( calendar_id, start, end )
calendar_id: the ID defines which calendar out of the calendar table is used.
If the calendar ID does not exist in the calendar table, WORKDAYS_BETWEEN
behaves like the DAYS_BETWEEN function and returns the number of days between the specified dates.
To calculate the workdays between two dates without a calendar table, REMAP_TIMESTAMPS can be used.
Example
[1] Here WORKDAYS_BETWEEN is used without an existing working calendar. Therefore it returns the number of days between the specified dates.
|