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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans