Date&Time Shift skip Weekends and count public holidays

Hello guys,

I try to calculate a target date. For example see my first row. Start date is 31.01.2019 (Thursday). Adding two working days should lead to a target date 04.02.2019 (Monday), but with the Date& Time Shift Node I only will get the 02.02.2019 which is a Saturday.
Anyone else faced this issue already and solved?

KNIME%20date%20and%20time%20shift

In addition I want to check if within start date and target date is a public holiday. My input would be a table which contains this information e.g.:

|Date|Public Holiday|
|01.01.2019|Yes|
|02.01.2019|No|
|03.01.2019|No|
|04.01.2019|No|
|05.01.2019|No|

Regards,
Yannik

Hi and welcome -

Indeed, this general question comes up regularly. Please try using the search functionality

https://forum.knime.com/search?q=holiday%20dates

3 Likes

Hi there @yannikUni,

besides solutions/ideas already offered in existing topics as @quaeler pointed out here is one more.

Create a “database” of working days and assign each one an unique identifier. Then for your input dates fetch corresponding identifier from database, sum it with your input to get identifier of wanted target date and go back to database to fetch that date :wink:

Here is link to workflow example on KNIME Hub.

If any questions feel free to ask.

Br,
Ivan

1 Like

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