I'm a beginner in Knime and would like to manage the overlapping of several dates.
I have 2 columns like that, the first one for startdate and the second one for enddate (in Date/Calendar format) :
[startdate, endate]
01/07/2012
06/07/2012
06/07/2012
12/11/2012
01/10/2012
11/11/2012
12/11/2012
12/11/2012
02/07/2012
17/09/2012
26/03/2013
31/12/2013
01/07/2012
31/01/2013
I have calculated some time operations like (startdate(i)-startdate(i+1)),(enddate(i)-enddate(i+1)) and (startdate(i)-enddate(i)) with the available (time)nodes in Knime, in order to deduce an algorithm. But no way.
The main goal is to identify if there is an overlap between each dates intervals and to extract the duration of the eventual overlap.
Like these 2 dates intervals :
06/07/2012
12/11/2012
01/10/2012
11/11/2012
<p>There is an overlap (a boolean = TRUE/FALSE), in this case it's TRUE. And to obtain the duration in days of the overlapping, in this case is 41 days.</p>
</td>
</tr>
<tr>
<td>
<p>Cheers,</p>
<p>Ahmed</p>
</td>
<td> </td>
</tr>
</tbody>
I think if sorting the data by startdates is allowed, you only have to check if the previous row's enddate is greater than the current row's. (So Sorter, Lag and probably Rule Engine or Java Snippet.) I assume startdate < enddate for all rows.
If the goal is to compute all row's overlap, I think the best option would be to implement a distance function for time intervals (or date collections with the assumption of two values there). That way, you will get a (half) matrix of overlapping values.