SQL Server Time Incorrect

IT CDM ELECTRONICS 21 Reputation points
2022-09-27T14:41:58.727+00:00

When I execute GetDate(), the value is ahead by about 4 hours. I would have thought this would be a time zone setting via Azure, but it seems to be set correctly (US/East). Any thoughts on why this value is incorrect and how it can be changed?

SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Tom Phillips 17,771 Reputation points
    2022-09-27T15:45:55.68+00:00

1 additional answer

Sort by: Most helpful
  1. KurtBMayer 841 Reputation points
    2022-09-27T15:24:50.523+00:00

    @IT CDM ELECTRONICS

    See this article: Getdate() in sql-server 2019 giving wrong date.

    Can try using SYSDATETIME, which queries the OS clock, instead of GetDate(), which queries the database timestamp.

    Please upvote or accept this thread as answered if it's helpful, thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.