Skip to content Skip to sidebar Skip to footer

Datetimeoffset.now In T-sql

I'm executing a INSERT to a sql 2008 db. How do I specify in T-SQL to insert NOW in a DATETIMEOFFSET column? GETDATE()?

Solution 1:

Maybe.

This would give you the local time of the server where SQL is installed.

Do you want to store timezone etc too? If so, SYSDATETIMEOFFSET() may be better

Post a Comment for "Datetimeoffset.now In T-sql"