A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Martin Handsteiner ,
It seems that this issue does not appear on SQL Server 2014 and below but appears on SQL Server 2016 and up.
Since your version is SQL Server 2019, you could have a try to lower the database compatibility level to 120 or below.
Or you could try to add a new connection string (e.g. timestampEncoding) which could be used to determine how timestamp should be encoded.
In addition, you could try with below as alternatives:
- Converting the schema to use
datetime2. - Casting values to
datetime.
You could refer to more details from below:
Selected datetime value doesn't match the original value on SQL Server 2016
Ability to explicitly specify conversion to datetime or datetime2
Best regards,
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.