I need to calculate total alarm real-time for multiple applications. Meaning there are times when different application's alarms may overlap each other. For instance,
start time stop time
Alarm A 04:10:16 17:04:58
Alarm B 15:59:33 17:01:08
Alarm C 17:00:28 17:00:38
Alarm A 04:10:16 15:52:32
Alarm C 11:26:45 11:40:56
Alarm C 04:10:16 11:18:04
Currently, I am parsing these into stem variables. I know the equation I need.
Compare first alarm stop time to second alarm start time, if it is Greater than/Equal then combine first and second alarm (using first alarm start time and second alarm stop time):
Alarm A 04:10:16 17:04:58
Alarm B 15:59:33 17:01:08 --> 04:10:16 17:01:08
repeat this process.
My question is, what is the best way to approach this? Can you use the COMPARE on two stem variables?
TIA