I am currently using:
SELECT DATEPART(TZ, SYSDATETIMEOFFSET())
However, it returns the offset in minutes. I would like to preserve the format of '-05:00' instead of '-300'
Thank you.
In MS SQL Server you can also use
SELECT DATENAME(tz, SYSDATETIMEOFFSET())
which will return a nvarchar with the offset
screenshot of the excecution result
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With