Microsoft SQL ServerDates

Syntax

  • EOMONTH (start_date [, month_to_add ] )

Remarks

as per https://msdn.microsoft.com/en-us/library/ms187819.aspx, DateTimes 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 valueSystem stored value
01/01/98 23:59:59.9991998-01-02 00:00:00.000
------------
01/01/98 23:59:59.9951998-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.9921998-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.9901998-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.

Related Examples

Create function to calculate a person's age on a specific date