clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 1044257 fiddles created (9442 in the last week).

DECLARE @now DATETIME2 = GETDATE() -- Default is precision 7 SELECT CAST(@now AS DATETIME) AS [DateTime] , CAST(@now AS SMALLDATETIME) AS [SmallDateTime] , CAST(@now AS DATE) AS [Date] , CAST(@now AS DATETIME2(0)) AS [DateTime2(0)] , CAST(@now AS DATETIME2(1)) AS [DateTime2(1)] , CAST(@now AS DATETIME2(2)) AS [DateTime2(2)] , CAST(@now AS DATETIME2(3)) AS [DateTime2(3)] , CAST(@now AS DATETIME2(4)) AS [DateTime2(4)] , CAST(@now AS DATETIME2(5)) AS [DateTime2(5)] , CAST(@now AS DATETIME2(6)) AS [DateTime2(6)] , CAST(@now AS DATETIME2(7)) AS [DateTime2(7)/Default]
DateTime SmallDateTime Date DateTime2(0) DateTime2(1) DateTime2(2) DateTime2(3) DateTime2(4) DateTime2(5) DateTime2(6) DateTime2(7)/Default
2020-01-16 10:05:15.177 2020-01-16 10:05 2020-01-16 2020-01-16 10:05:15.0000000 2020-01-16 10:05:15.2000000 2020-01-16 10:05:15.1800000 2020-01-16 10:05:15.1770000 2020-01-16 10:05:15.1767000 2020-01-16 10:05:15.1766700 2020-01-16 10:05:15.1766670 2020-01-16 10:05:15.1766667
 hidden batch(es)