I'm working on identifying events that happened in date ranges that aren't specifically covered by the data. To do this, I have a list of date ranges, some sequential, some with gaps. What I'm tyring to get is a list of date ranges that span the gaps. For example: Cat1 Cat2 EffDt TermDt A 1 8/8/2016 10/16/2016 A 1 11/1/2016 1/10/2017 A 1 1/11/2017 4/23/2017 A 1 4/24/2017 7/19/2017 A 1 7/20/2017 9/30/2017 A 1 10/1/2017 3/31/2018 A 2 10/1/2017 4/29/2018 A 2 10/1/2017 7/1/2018 In this case, A1 is covered from 8/8/2016 through 10/16/2016, followed by a gap from 10/17/2016 through 10/31/2016, and coevered again from 11/1/2016 through 3/31/2018. What I have been trying to get out of this is the 10/17/2016 amd 10/31/2016 values. In the event that there were multiple gaps, I'd want to identify each of them. I've been trying a few different loop permutations, but haven't been able to get anything to work quite right. Any help would be greatly appreciated. Thanks!
... View more