as per https://msdn.microsoft.com/en-us/library/ms187819.aspx, DateTime
s are only precise to 3ms.
Rounding of datetime Fractional Second Precision datetime values are rounded to increments of .000, .003, or .007 seconds, as shown in the following table.
User-specified value | System stored value |
---|---|
01/01/98 23:59:59.999 | 1998-01-02 00:00:00.000 |
------ | ------ |
01/01/98 23:59:59.995 | 1998-01-01 23:59:59.997 |
01/01/98 23:59:59.996 | |
01/01/98 23:59:59.997 | |
01/01/98 23:59:59.998 | |
------ | ------ |
01/01/98 23:59:59.992 | 1998-01-01 23:59:59.993 |
01/01/98 23:59:59.993 | |
01/01/98 23:59:59.994 | |
------ | ------ |
01/01/98 23:59:59.990 | 1998-01-01 23:59:59.990 |
01/01/98 23:59:59.991 | |
------ | ------ |
If more precision is required, time
, datetime2
or datetimeoffset
should be used.