Convert UTC timezone to US

ADF_Coder 0 Reputation points
2024-07-14T16:57:51.3366667+00:00

Hi All,

I need to convert the timezone from UTC to the US timezone. Can anyone please tell me what function I need to use: convertTimezone or convertfromutc? This is because my sharepoint is in the US time zone.

@convertTimeZone('2024-07-14T07:36:08.8384661Z','UTC','U.S. Mountain Standard Time')
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,107 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. akinbade abiola 8,300 Reputation points
    2024-07-14T17:50:37.3666667+00:00

    Hello ADF_Coder,

    Thanks for your your question.
    Your usage seems correct. You can also test the below:

    SELECT CONVERT(datetimeoffset, '2024-07-14T07:36:08.8384661Z') AT TIME ZONE 'UTC'
           AT TIME ZONE 'US Mountain Standard Time' AS 'US_Mountain_Time';
    

    You can mark it 'Accept Answer' if this helped.

    Regards,

    Abiola


  2. NIKHILANETHIKUNTA 75 Reputation points Microsoft Vendor
    2024-07-17T08:18:04.14+00:00

    Hi @ADF_Coder
    Thanks for your question and using Microsoft Q&A platform.

    Azure Data Factory (ADF) uses UTC time zone by default. If you want to convert it to a specific time zone, you can use the convertFromUtc function in ADF.
    You can try this expression:

    @convertFromUtc(utcnow(),'Mountain Standard Time')
    

    User's image

    User's image

    This will convert the UTC time to US time.

    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.