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

SQL SERVER - 2008 - Find Current System Date Time and Time Offset timeoffset

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

SQL DateTime, SQL Scripts
Previous Post
SQLAuthority News – Author BirthDay – SQL Server Birthday
Next Post
SQL SERVER – 2008 – Get Current System Date Time

Related Posts

2 Comments. Leave new

  • Tiago Sumita
    July 16, 2011 5:51 am

    nice, thanks

    Reply
  • Can you help me how to check if hte system time is great than 11:00pm?

    eg: i want to chek like select convert(varchar,getdate(),108) > ’11:00′

    Reply

Leave a Reply