Hi,
while working on an solution for another post and cross validating some sample data I noticed the Date&Time Difference node does not factor in nor provides the option to in-/exclude the start or end date.
That always results in a difference which can lead to miscalculations due to misinterpretations. I.e. by factoring in all days between 2023-01-25 and 2023-01-30 one could count six days but Knime, as the node correctly states, only calculates the difference (30-5).
Sample Data
Date 1 | Date 2 | Days Total expected (Chat GPT) | Days diff calculated |
---|---|---|---|
2021-11-15 | 2022-01-22 | 69 | 68 |
2021-07-13 | 2022-08-31 | 415 | 414 |
2021-05-01 | 2021-06-03 | 34 | 33 |
2022-04-15 | 2022-07-06 | 83 | 82 |
2022-02-02 | 2022-03-20 | 47 | 46 |
2023-01-25 | 2023-01-30 | 6 | 5 |
2023-01-30 | 2023-02-03 | 5 | 4 |
2023-01-25 | 2023-02-06 | 13 | 12 |
2023-01-04 | 2023-02-06 | 34 | 33 |
2023-01-19 | 2023-03-13 | 54 | 53 |
Hence, I added both labels bug and feature-request to also make it more apparent to the user.
Best
Mike