I have time interval as below,
1- 07:00:00 to 09:30:00 (duration 02:30:00)
2- 08:00:00 to 11:00:00 (duration 03:00:00)
But actual combined duration is 07:00:00 - 11:00:00 (Dur 04:00:00). When we are adding 2 individual duration it will give result 5:30:00..like this different combinations may happen(1-7,5-8,9-10,6-9:30) I want a logic to find actual duration without considering intersecting time intervals. If it is already answered kindly give me the path to it. Thanks in Advance. Note: It is to calculate the duration of work done from attendance data and on duty slips