web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

time conversion from utc to local time(Ist)

(0) ShareShare
ReportReport
Posted on by 5,514

i need add time conversion from utc to local time(Ist)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Wouter Madou Profile Picture
    3,392 on at

    You can set the time conversion on the field level in the customization to user local.

    technet.microsoft.com/.../dn946904.aspx

  • sandeepc Profile Picture
    5,514 on at

    i dnt want to change my time  in crm. as it is in utc now it should convert into IST. it should work on javscript code. is that possible

  • Verified answer
    shivaram Profile Picture
    3,315 on at

    Hi Sandeep, You can Use ToLocalTime() Option for Conversion

    For Ex:

    var date = DateTime.UtcNow;

    var localdate = date.ToLocalTime();

    Hope it helps you

    Thanks

  • shivaram Profile Picture
    3,315 on at

    Hi sandeep,

    Do you want this using Javascript?

  • sandeepc Profile Picture
    5,514 on at

    yes

  • Verified answer
    shivaram Profile Picture
    3,315 on at

    You can do one thing.

    Lets say you are getting UTC Date for Createdon, Then

    You can use following lines

    var CreatedOn=Xrm.Page.getAttribute("createdon").getValue();

    var LocalDate=new Date(CreatedOn+ "UTC")

    Local Date will give current Date and Time (IST)

    Hope it will helps you.

    Thanks.

  • sandeepc Profile Picture
    5,514 on at

    getting and field :window error.

  • shivaram Profile Picture
    3,315 on at

    Can you please attach screenshot for this error.? And did you get UTC Date? How you are retrieving UTC Date?

  • sandeepc Profile Picture
    5,514 on at

    4r.PNG created on : utc time.. it should show same utc time.. but its sHowing IST

  • shivaram Profile Picture
    3,315 on at

    Can you please try to debug and tell me in which line it is giving error?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans