# Get an overlapping interval of a set of time intervals

Posted 1 year ago
1685 Views
|
|
2 Total Likes
|
 I generate a set of time series data during the data analysis process. Want to know the time period(overlay interval) common to all-time series. What should I do the fastest? dateRange = {DateInterval[{{{2019, 8, 25, 7, 3, 39.}, { 2019, 11, 1, 7, 56, 11.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 3, 58.}, { 2019, 11, 1, 7, 58, 18.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 2, 36.}, { 2019, 11, 1, 7, 57, 2.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 2, 28.}, { 2019, 11, 1, 7, 56, 32.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 5, 49.}, { 2019, 11, 1, 7, 54, 10.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 0, 12.}, { 2019, 10, 30, 10, 35, 22.}}}, "Instant", "Gregorian", 8.], DateInterval[{{{2019, 8, 25, 7, 0, 57.}, { 2019, 11, 1, 7, 55, 0.}}}, "Instant", "Gregorian", 8.]}; I tried IntervalIntersection@dateRange The result is not as expected. Attachments:
 The problem is that IntervalIntersection expects the intervals as separate arguments, not a List of intervals. Try IntervalIntersection @@ dateRange