Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

DateDiff Issue

$
0
0

What is wrong with the query below?

      SELECT DATEDIFF(hour,GETDATE(1),GETDATE(-2))
      + ':' + DATEDIFF(minute,GETDATE(1),GETDATE(-2)) MOD 60
      + ':' + DATEDIFF(second,GETDATE(1),GETDATE(-2)) MOD 60 AS Elapsed

Thank you


Zionlite


Viewing all articles
Browse latest Browse all 23857

Trending Articles