If I run these two functions I am getting different result. The datetime.Now in dotnet is showing the same result as it is showing in the system time while there is a difference of around 20 minutes if i use getdate()… what is the cause, and how to overcome this?
If I run these two functions I am getting different result. The datetime.Now in
Share
The 2 machines have different system times.
GETDATEgets time from the server where SQL Server is installed (where it runs).DateTime.Nowgets time from the App or Web server or your local PC.Don’t mix up “machine that sends
GETDATE()command” and “machine that runs it”.