Is it possible to deceive SQL Server to return a different date on GetDate() without actually changing the machine date?
This would be great, since we have a database with old data and I’m trying to test some queries that use getdate().
I can change my machine date but that brings some other problems with other applications…
Any tips?
Thanks!
Is it possible to deceive SQL Server to return a different date on GetDate()
Share
According to the documentation for getdate():
Since it’s derived from the OS, I don’t think you can change it separately.