Separate weekdays and weekends in knime

Hi collegues,

Is there such a way to identify and separate the days of the week (for example from Monday to Friday) and the weekend days (from Saturday to Sunday)? I'm starting only with a datetime. Probably It should be useful if I ad a new column with day identifier. But I don't know to perform this action automatically.

Especially considering that the rows are not for all the days.. some rows has the same day, and some rows are missing some days because maybe there weren't no records in that specific day.

Any suggestions?

Thanks in advice.

Hi Giulio,

you need the extract date&time fields node, to get the day of week.

Than you can use the nominal value filter node, to get weekends only.

Cheers, Iris 

Thank you Iris for you reply,

unfortunately the real problem in this situation is that I have also missing dates and repeated dates.

For example:

datetime day
03/05/2017 saturday
03/05/2017 saturday
06/05/2017 tuesday


Okay no, I made a mistake.. your solution works perfectly, cause it dynamically assign each day considering date missing values or repeated date values.

Due to some problems encountered with the nodes that you have suggested me, in my case I have used the String to Date/Time(legacy) node and then the Date Field Extractor(legacy) node.

1 Like

Hi I think here is a solution using a R package called bizdays,

Hope it helps

MauWorkingDays.knwf (14.5 KB)