Skip to main content
Solved

Creation of a WORKDAY_CALENDAR

  • October 16, 2024
  • 5 replies
  • 80 views

julia.bauer
Level 9
Forum|alt.badge.img+1

Hello everyone,

 

I want to use the WORKDAYS_BETWEEN function, however, in preparation for this function, I need to create a Workday Calendar. How do I do this within data integration/KM? 

 

Thank you so much!

 

BR

Julia Bauer 

Best answer by janpeter.van.d

Hi @julia.bauer,

To use a standard Workday Calendar, I would store your calendar definition in a Knowledge Model variable. When creating calculations, you can refer back to this variable. 

Then use functions that are build for using Workday Calendars:

I hope this clarifies. 

 

 

5 replies

abhishek.chatu14
Level 11
Forum|alt.badge.img+4

Hi you should create a KPI/Attribute in the KM for the same

WORKDAYS_BETWEEN ( "TimestampTable"."Begin" , "TimestampTable"."End" , WEEKDAY_CALENDAR ( MONDAY 09:00 - 17:00 TUESDAY 09:00 - 17:00 THURSDAY 09:00 - 17:00 FRIDAY 09:00 - 17:00 SATURDAY 09:00 - 17:00 ) )


julia.bauer
Level 9
Forum|alt.badge.img+1
  • Author
  • Level 9
  • 58 replies
  • October 16, 2024

Hello @abhishek.chatu14 , thank you for replying! What do you use as TimestampTable.Begin etc.? I don’t have such a table?

 

I mean this is the formula I’m trying to set up for another use-case. Here I have the Begin and End field. However, the workday calendar is missing. I’m trying to create the workday calendar without the WORKDAYS_BETWEEN function as I want to use the workday calendar also for other functions, such as. ADD_DAYS etc. 

 

Am I missing your point?

 

Thank you so much!

 

Best regards

Julia Bauer 


abhishek.chatu14
Level 11
Forum|alt.badge.img+4

What you are looking for is REMAP_TIMESTAMPS

REMAP_TIMESTAMPS ( "T"."C" , MINUTES , WEEKDAY_CALENDAR ( MONDAY 08:00 - 16:00 TUESDAY 08:00 - 16:00 WEDNESDAY 08:00 - 16:00 THURSDAY 08:00 - 12:00 ) )

See if this helps


janpeter.van.d
Level 12
Forum|alt.badge.img+26
  • Level 12
  • 496 replies
  • Answer
  • October 17, 2024

Hi @julia.bauer,

To use a standard Workday Calendar, I would store your calendar definition in a Knowledge Model variable. When creating calculations, you can refer back to this variable. 

Then use functions that are build for using Workday Calendars:

I hope this clarifies. 

 

 


julia.bauer
Level 9
Forum|alt.badge.img+1
  • Author
  • Level 9
  • 58 replies
  • October 24, 2024

Thank you @janpeter.van.d  and @abhishek.chatu14 !