What is the meaning of the following SQL Server declaration: datetime2(7)?

datetime2 [ (fractional seconds precision) ]

It’s the fractional seconds precision according to the MSDN documentation.

http://msdn.microsoft.com/en-us/library/bb677335.aspx

This is the microsoft example of 4:

DECLARE @datetime2 datetime2(4) = '12-10-25 12:32:10.1234';

So I would assume that 7 would be:

DECLARE @datetime2 datetime2(7) = '12-10-25 12:32:10.1234567';

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)