SIJCOOKE - Friday, January 20, 2017 2:31 PM
What do you mean? Find the timespan between the end of the previous record and the current record? Also, please post create table and insert scripts for your table(s)... like this:CREATE TABLE TimeSpans(
SpanID INT IDENTITY,
StartTime DATETIME,
EndTime DATETIME);
INSERT INTO TimeSpans(StartTime, EndTime) VALUES
('12-Jan-2017 08:00', '20-Jan-2017 14:00')
,('5-Feb-2017 11:30', '16-Feb-2017 20:15')
,('12-Mar-2017 09:15', '19-Mar-2017 22:00')
,('1-Jan-2017 10:00', '6-Jan-2017 13:00');