Date ranges

I have multiple enrollment lists that I have read using the list reader and have managed to almost get the data how I want it. However, when it comes to dates associated with IDs I have come across a problem. An ID can have multiple rows associated with it and each row has a start date and end date. I used the group by node, grouping the ID and then used the min start date and maximum end date to get a single row with the date range. The problem is that there are sometimes gaps between the date ranges that occur for the IDs and in those cases these rows would need to be left. I want to only group those rows where there is no gap between the date ranges. Any help would be greatly appreciated. Thanks.

If i understood your challenge correctly, this should do it.
missing date.knwf (26.7 KB)


Hi @pagey,

welcome to KNIME Community!

How about sharing some input data and desired output if @Gavin_Attard solution doesn’t work for you?


Thanks I will look into this. Does it account for there being a start date and end date in each row? So essentially it checks to see if the end date above has no gaps to the start date below it.


That particular it does not have, i worked on a single column of generated dates, one row per date.

However if you go through the workflow, it’s relatively easy to change to that requirement by amending which column is used for the ‘lag’ node and the date difference calc.


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