StartedOn
EndedOn
declare @baseDate datetime = '2016-01-01' select RunTime = convert(varchar(10), datediff(minute, StartedOn, coalesce(EndedOn, getutcdate())) / 1440 ) + 'd, ' + convert(varchar(30), dateadd(second, datediff(SECOND, StartedOn, coalesce(EndedOn, getutcdate())), @basedate), 8) from dbo.MyTable
1d, 22:06:33