Query #1.4: Since we only need 1 row from the Query #1.3's output, we remove all duplicated rows using SELECT DISTINCT Statement We calculate the dates for the first day of this and next year using ...
CONVERT(VARCHAR, DATEADD(ms, ((DATEDIFF(SECOND, start_time, GETDATE())) % 86400) * 1000, 0), 114) AS TimeElapsed_DDHHMMSS, CONVERT(VARCHAR, DATEDIFF(SECOND, GETDATE ...