Thursday, March 24, 2011

What function do I use in Sql Server 2005 to get the current datetime in utc?

I've used GetDate() in defaults for a long time.
What is the equivalent call, or logic in SQL 2005 for me to put in a default that will give me the current UTC time.

From stackoverflow
  • GETUTCDATE()
    
  • GETUTCDATE()

    The difference between GETDATE() and GETUTCDATE() is time zone number of the SQL Server machine.

0 comments:

Post a Comment