How to set time zone for SQL Warehouse, Azure Databricks?

Mohammad Saber 591 Reputation points
2023-06-14T05:26:48.62+00:00

Hi,

 

I want to change the default time zone for SQL Warehoue in the SQL Persona.

 

When I try to Edit the SQL warehouse settings in the "SQL Warehouses" section, I am not able to find any setting where I can set the time zone.

 

I am aware that I can set the time zone by running the query"

SET TIME ZONE 'GMT+10';

However, I don't want t repeat it every time I run a query in the query editor. Instead, I want to see the local time zone as the default time zone of the SQL warehouse.

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,562 questions
0 comments No comments
{count} votes

Accepted answer
  1. PRADEEPCHEEKATLA 90,811 Reputation points Moderator
    2023-06-15T07:54:49.72+00:00

    @Mohammad Saber - Thanks for the question and using MS Q&A platform.

    The system default is UTC.

    The TIMEZONE configuration parameter controls the local timezone used for timestamp operations within a session.

    You can set this parameter at the session level using the SET statement and at the global level using SQL configuration parameters or the SQL Warehouse API.

    An alternative way to set the session timezone is using the SET TIME ZONE statement.

    For more details, refer to TIMEZONE and SET TIME ZONE.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.