TSQL DateTime DataType - fractional seconds vs milliseconds
Instead of specifying 23:59:59.999 you must specify 23:59:59.997 due to rounding.

The far better way would be to :

WHERE MyDate &gt;= '2013-03-05' AND MyDate &lt; '2013-03-06'


Since this captures ALL activity on 2013-03-05