SQL Server : datetime comparison ignoring few milliseconds -


this question has answer here:

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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -