Timestamp issue

  • Let us say we set up a MS SQL server in the central time of US. I set up a column DateUpdated using default value GETDATE(). Whenever I insert a new row, it is marked with the value of local date and time on the DateUpdated column.

    Now, a user in New York (East time of US) would like to insert a row. What is the value on the DateUpdated column? East time of US or Central time of US?

    All sites of my company locate in the same time zone. I cannot test it.

    Any input will be greatly appreciated in advance.

  • GETDATE() returns the current local time that the database server is set to.

    If you need to deal with data from multiple timezones, you might use GETUTCDATE(). It returns the current UTC time, no matter what the local server time is.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply