Skip to main content

Documentation Portal

Datetime scale

Starting with SQL Server 2008 Native Client, when working with datetime parameters with a decimal part, the scale of the precision must be provided by the client or the decimal part must be stripped off.

7 corresponds to the precision set for the SQL Server datetime2 data type. 7 is the default.

If this scale of precision is omitted the ODBC connection will fail to fetch timestamps correctly. This issue can be recognized in the connector logs by the following error message:

[Microsoft][ODBC Driver 13 for SQL Server]Datetime field overflow. Fractional second precision exceeds the scale specified in the parameter binding.

If this error is found in the logs, the datetime scale parameter should be configured in the connector configuration to indicate the precision of the date times in the data source.

Parameter:

<add key="generic.query.noninteractive.datetime.scale" value="7" />

Supported as of connector version: <v.3.5.2329-60e21d1>

Supported for the following data source providers:

  • ODBC