Convert date to ticks in SQL Server

前端 未结 1 886
南笙
南笙 2021-01-18 08:22

Does anyone know how to convert a DATETIME COLUMN to TICKS in SQL Server?

相关标签:
1条回答
  • 2021-01-18 09:12

    If you are trying to have t-sql convert a value to ticks that can be compared with the "same" value created in .NET it will not work. A DateTime data type in SQL Server only has a precision of about .003 seconds (actually values are rounded to .000, .003 or .007) or 10-3 whereas a DateTime data type in .NET has a precision of 100 nanoseconds (10-7).

    0 讨论(0)
提交回复
热议问题