calculate date difference excluding holidays/weekends

Hi all,

I am looking for the function in KNIME  doing the same as "networkdays()" in Excel. Basicaly I want to be able to exclusde certain dates(provided as a list) from the Time Difference calculation.

Is there already such an option in KNIME, or could you advise on strategy to do it? 

I was looking for similar functionality recently - wanted to exclude weekend days from a time difference. I couldn't find a way to do it with existing nodes, so eventually used a java snippet.

It would be great if this functionality could be added to the Time Difference node - eg add 'Weekday' as a new granularity of time difference - or allow users to exlude specific days/dates from the calculation?



Hi Johnm,

finally I also made a metanode with R-script, that uses a separate list of days to exclude.   I agree with you - such option would  seem a nice addition to the timedifference node.

P.S. For people landing here after googling for the similar thing  - if there is still no standart solution and you do not want to code it, I attached mine. I beleeve it works fine, no guarantee though 




I just opened a feature request for this one.

Cheers, Iris

Hi Tatiana,

Thanks for this file, however, I don't know how to get the file named Holidays.txt so I can replicate our holidays.




Hi Iris,

was there any progress on this issue? 

Would be lovely to be able to supply a list of dates to be excluded from the calculation, sort of like in reference filter. 

Best, Tatiana.

Hi Everyone, has this concern already been resolved?

Hi Tatiana, could you possible post the workflow you made to solve this issue? For some reason
I can not download open the workflow file you appended.

Thanks in advance.

We had such a discussion and I built a workflow using a public database of holidays maybe you can adapt that. Of course you would have to check what the holidays mean for your purpose.

I could try to see if I can use the workflow above.

1 Like