Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Get datetime field value in a specific timezone when using direct sql query with Dynamics

Posted on by 5

I'm using a direct sql query to fetch datetime fields from Dynamics 365. It returns the datetime values in UTC (as stored in the Sql DB). Is there a way to get the datetime field value in a specific time zone (E.g. EST or JST) when using sql query?

  • Suggested answer
    RE: Get datetime field value in a specific timezone when using direct sql query with Dynamics

    SQL is registered in UTC and displayed in the Dynamics 365 UI according to the time zone set by the user.

    It may be possible to convert the time in a SQL query.

    learn.microsoft.com/.../at-time-zone-transact-sql

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Get datetime field value in a specific timezone when using direct sql query with Dynamics

    Hi AbdiasM,

    After reading the instruction I can say No.

    ...

  • AbdiasM Profile Picture
    AbdiasM 5 on at
    RE: Get datetime field value in a specific timezone when using direct sql query with Dynamics

    Thanks. I'm aware of this solution. I want to know if there's any solution that Microsoft dynamics provides out-of-the-box.

  • Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans