GETDATE() function in SQL Server does not work properly

120 Views Asked by At

For some reason the following code in my database server always returns the same value:

SELECT GETDATE();

Date and time are always the same no matter how many times I execute this code and the date and time returned are several days behind the real date and time.

I have tried restarting the database server and verified that the system date and time on the server host machine are correct.

I am using Microsoft SQL Server 2019 and executed this query in Azure Data Studio.

This used to work, but now it does not. Do you have any tips?

0

There are 0 best solutions below