DATEDIFF output between dates using TIME

Let’s create an example.


DECLARE @cTimeStamp CHAR(25)
SELECT @cTimeStamp = DATEADD(MINUTE, -1, GETDATE())
SELECT CONVERT(TIME, GETDATE() - @cTimeStamp) AS [Duration]

Combines the output to
Duration
——–
00:01:49.6930000

Comments are closed.

Post Navigation