SQL Server : datetime comparison ignoring few milliseconds -
this question has answer here:
- why sql server losing millisecond? 6 answers
i noticed 2 datetimes considered equal if 1
2010-12-31 15:13:48.000
and other
2010-12-31 15:13:48.001.
i thought in beginning rounding or down nearest full seconds turned out
2010-12-31 15:13:48.002
registers difference correctly.
any idea why happens?
the datetime
data type accurate 3 milliseconds (0.0033 seconds), results make sense. values rounded 0.000, 0.003, , 0.007. so, first example rounded to: "2010-12-31 15:13:48.000" , second "2010-12-31 15:13:48.003".
you can read in documentation.
Comments
Post a Comment