we have two SQL Servers.
We have the following example SQL to recreate an issue we are facing.
select * from (
select \'2020-11-04 08:00:00\' as start
uni
I suspect the servers have different base languages/settings for dates - though obviously this is just a guess.
One may consider 2020-11-04 08:00:00
as 8:00am on November 4, whereas the other treats it as 11 April.
These can be based on
You should use a universal datetime format e.g., 20201104 08:00:00
. If you change the query above to use these, and the servers return the same answer as each other, I think you've found the issue.
Of course, the servers could be in different timezones and/or haven't accounted for daylight savings - but SELECT getdate()
should tell you what the server dates are.