Skip to content

Precision Loss in Time Stamp in MS SQL Server

When you run an Ad Hoc Report with a date filter of type BETWEEN (with day and month values), the query generated for Ad Hoc View is translated to a time stamp that includes milliseconds.

For example, between '2020-07-01 00:00:00' and '2020-07-31 23:59:59.999'. The time stamp 2020-07-31 23:59:59.999 in MS SQL Server is converted to 2020-08-01 00:00:00.000 which leads to filtering of data that is not required.

To handle this, the ignoreMillisecondsInTimestampFilter property should be set to true.

Ignore Milliseconds in Time Stamp Filter

Configuration File

applicationContext-semanticLayer.xml

Property

Description

ignoreMillisecondsInTimestampFilter

Ignores the milliseconds in a date time stamp. By default, the value is false.