Given a table with two DateTime columns (StartTime and EndTime), and rows with data which may overlap, how can I find a single instance of each combined start/end block?
For example, given:
- 07/01/2013 00:00:00, 07/01/2013 12:00:00
- 07/01/2013 06:00:00, 07/01/2013 18:00:00
I need a single result { 07/01/2013 00:00:00, 07/01/2013 18:00:00 }. The work can be done either in a SQL query, or in C# given a DataTable as described above.