Diagnostics
Problem
Datetime values are inserted into the SQL Server incorrectly.
The values inserted are:
2019-12-04 00:00:00.000
2019-12-05 00:00:00.000But they should be:
20191204 00:00:00:01
20191204 23:59:59:999
Solution
The format of the field in the synonym's Master File affects the values because the underlying SQL's CAST values differ.
To address this issue, change the format in the Master File as follows:
From: USAGE=HYYMDs, ACTUAL=HYYMDs
To: USAGE=YYMD, ACTUAL=DATE