SQL SERVER – 2008 – Find Current System Date Time and Time Offset

If you want to find current datetime in SQL Server I suggest to read the following post :

SQL SERVER – Retrieve Current Date Time in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}

This post is related to new feature available in SQL Server 2008. In SQL Server 2008 there is a function which provides current offset of the system from GMT time as well. Basically it shows the system datetime with offset. I think this can be useful in some of the instances where SQL Server are depending on the time offset.

SELECT SYSDATETIMEOFFSET() AS 'Windows System Time'
GO

Reference : Pinal Dave (https://blog.sqlauthority.com)

Exit mobile version