Using workdays_between without a dedicated calendar table


#1

Hi guys,

my problem ist actually quite simple. I want to calculate the number of workdays (monday till friday) between two given timestamps. The relevant function requires me to reference a specific calendar table from the data model. Within the data model options, however, the possiblity exists to define a custom calendar without implementing a dedicated table (simply by selecting relevant days and time windows). My questions is: How do I reference this adjusted standard calendar as a parameter for the function workdays_between or is it possible to generate a table from the customized calendar?

KR
Ruben


#2

Hi Ruben,

AFAIK workday configuration option in data model influence by Process Explorer. If you want to use simplified workdays calculation (i.e. only based on day of week, ignoring holidays) you can use REMAP_TIMESTAMP. Formula will look like:
DAYS_BETWEEN(
REMAP_TIMESTAMP(“start date column”, MONDAY 08:00-17:00 TUESDAY 08:00-17:00 …),
REMAP_TIMESTAMP(“end date column”, MONDAY …)
)