Different types and C # DateTime DateTime accuracy SQLServer

datetime type is 3.33 ms time resolution, than the accuracy may be approximated to second 0.000,0.003,0.007

Microsoft's official documentation: datetime type specified accuracy: three thousandths of seconds (3.33 milliseconds 0.00333 seconds). All values ​​in datetime type display, be adjusted during processing. That will be rounded to a few milliseconds specific bit values: 0,3,7: such as: (9,0,1) causes adjustment into 0; (5,6,7,8) causing adjustment 7; (2 , 3,4) 3 causes adjustment.

sqlserver DateTime replaced datetime2 type (SQL Server 2008 and above only), this time the accuracy of C # and on the same time accuracy DateTime2

Guess you like

Origin www.cnblogs.com/volts0302/p/12356618.html