Skip to content
Advertisement

Calculate the time period a certain field is overlapping in SQL Server

I am currently trying to figure out the overlapping time period between records. I already have a query that indicates if it is overlapping another field with ‘yes’ and ‘no’. But I need to have the exact duration of the overlapping time period when the field has ‘yes’ as indication. Can someone help me with it?

Query:

Result:

enter image description here

Advertisement

Answer

Check this for the difference in days.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement