If you have been working with Azure SQL Server, you would have queried the sys.event_log table to check the logs of the server. I needed to query this table to investigate the issue of an application failing to wake up the database in a paused state.
Azure SQL Servers tend to be in UTC time format when you create them by default.
If you run a SELECT GETDATE(), it will return a UTC time following what the server is on.
My timezone is Central Standard Time. I needed to convert UTC to CST.
Here's the code I used to do that:
SELECT GETDATE() AT TIME ZONE 'UTC' AT TIME ZONE 'Central Standard Time'
,[end_time] AT TIME ZONE 'UTC' AT TIME ZONE 'Central Standard Time' AS [end_time]
,[event_category]
No comments:
Post a Comment