Hi,
I have to write query to find the overlap time between start time and end time.
Please find the below Result set of My Table.
ID DID StartTime EndTime
1 1 11:10 AM 12:20 PM
2 1 04:10 PM 04:40 PM
3 2 12:10 PM 01:00 PM
4 2 04:20 PM 04:55 PM
Please see the rows with ID 1 and 3.
In First Row Start Time is 11:10 AM and End Time is 12:20 PM and in Third Row Start Time is 12:10 PM and End Time is 01:00 PM that means overlap time is 10 Minutes manualy. But I want to calculate dynamicaly using SQL Query.