Hi all, I have a situation like the following: I have some events with a start and end time that tell me when there has been an outage inside a building compartment. Building 1 compartment 1 - start: 07:00:00, end: 07:30:00 Building 1 compartment 2 - start: 06:50:00, end: 07:20:00 Building 1 compartment 1 - start: 09:00:00, end: 09:10:00 Building 2 compartment 3 - start: 07:00:00, end 08:00:00 Building 2 compartment 4 - start: 07:15:00, end: 07:45:00 What I need to do is to calculate the total amount of time a building was under outage for each building. This means that I do not care about in which compartment the outage was, but just about the building. The problem however, is that in this example I can't just sum the event durations for each building because, for building 1 compartments 1/2 and building 2 compartments 3/4 they overlap. Instead the correct solution would be the following: Building 1: 50 mins Building 2: 60 mins The first bulleted list you see above roughly mirrors the events list I am collecting from my search. I have tried a few things but I can't figure out how to handle these kind of overlapping events. Any clues?
... View more