-- How To Check
Time Difference in SQL Server
DECLARE @StartTime DateTime = DateAdd(Mi, -15, GetDate())
Select @StartTime StartTime;
Declare @EndTime DateTime = GetDate()
Select @EndTime EndTime
-- Now See the Difference betwen StartTime and
EndTime
Select Convert(Varchar(15), DateAdd(Ms, DateDiff(Ms, @StartTime, @EndTime),0),114) as TimeDifference
--WAITFOR DELAY '00:00:10'