Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to match two time intervals like in the below example. I found this example but looks too complicated. Any idea how to get it easier? I've tried with master calendar but didn't get me to the needed results.
Intervals1:
| StartDate1 | EndDate1 |
|---|---|
| 2015-05-01 | 2015-05-31 |
Intervals2:
| StartDate2 | EndDate2 |
|---|---|
| 2015-04-15 | 2015-05-15 |
Results:
| StartDate1 | EndDate1 |
|---|---|
| 2015-04-15 | 2015-04-30 |
| 2015-05-01 | 2015-05-15 |
| 2015-05-16 | 2015-05-31 |
Regards,
Przemek
As per logic start date and end date are picked up from different source Ids, It seems you need two Ids in one final record, one for start date source record and another for end date source record. Not sure though.
I am bit late today.
There was a recent similar discussion on how to match intervals with IDs, have a look at
How to check whether certain record timestamps overlap...
It should demonstrate also how to interval match the subintervals back into the original intervals (so you get the information for each subinterval which original intervals contribute).
In the referenced sample QVW, there are two keys to consider, localilty and machine ID, so I think you should be able easily create a solution for your specific requirements.
Best,
Stefan
Indeed, it'd look strange with 2015-02-31 🙂 Very many thanks!