Dear team,
Need your help to figure out the possible solution.
There are tow time columns (Uptime and Downtime of any event/alarm) and we need to achieve like :
An event will pass a time filter if for any time duration, the event was active within the time defined by the time filter.
For example->
Table structure like:
DATE | ALARMUPTIME | ALARMDOWNIME | ALARMID |
3/3/2017 | 3/3/2017 17:15 | 1 |
3/4/2017 | 3/3/2017 17:15 | 1 |
3/5/2017 | 3/3/2017 17:15 | 3/5/2017 16:47 | 1 |
Here Alarmid=1 has uptime of 3/3/2017 17:15 AND finished on downtime of =3/5/2017 16:47.
So it remain active till 3/5/2017 16:47.
So if below are filter selections then:
Exmaple 1 ) Date filter: 3/3/2017, 5/3/2017
Hour Filter: 16:00
Alarm Up time: 3/3/2017 17:15:06
Alarm Down time: 5/3/2017 15:47:13
Calculation->Fails the time filter (Events not vsisble)
Exmaple 2 ) Date filter: 3/3/2017, 3/4/2017, 5/3/2017
Hour Filter: 16:00
Alarm Up time: 3/3/2017 17:15:06
Alarm Down time: 5/3/2017 15:47:13
Calculation ->Pass the time filter.(Events will be visible)
Can you please advise how can I achive something like above to pass/fail the hour filter?