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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

In x++ UTCTime

(0) ShareShare
ReportReport
Posted on by 1,215

Hi guys,

i have a system field created Date and time, and modified date and time.

same field i used in form level now i want to  show the date UAE how to convert  <UTC/GST >

give us a Example how to do in x++?

Thanks. 

I have the same question (0)
  • Verified answer
    vinitgoyal2005 Profile Picture
    6,332 on at
    RE: In x++ UTCTime

    Hi Riyas,

    Look at DateTimeUtil::applyTimeZoneOffset method.

  • Riyas ahamed F Profile Picture
    1,215 on at
    RE: In x++ UTCTime

    Thanks for your replay Vinit Goyal,

    i am getting error below.

    The field 'CreatedDateTime' is read only. A value cannot be assigned to it.

  • Sukrut Parab Profile Picture
    71,699 Moderator on at
    RE: In x++ UTCTime

    What you are trying to do with created date time ? Are you trying to update it ?

  • Verified answer
    Martin Dráb Profile Picture
    236,519 Most Valuable Professional on at
    RE: In x++ UTCTime

    Can you give us more details about your requirement, please?

    The value is stored in UTC and it's - by default - shown in user's preferred timezone. If you want user's preferred timezone, you're already done. If you want UTC, set TimezonePreference property to NoConversion.

    If you want value in some other timezone, you'll need a conversion in code (DateTimeUtil::applyTimeZoneOffset(

  • Riyas ahamed F Profile Picture
    1,215 on at
    RE: In x++ UTCTime

    Thanks for your replay Sukrut Parab ,

    No , updating i am doing created date and time UTC to GMT convert Like :UAE time how to do in x++ ?

  • vinitgoyal2005 Profile Picture
    6,332 on at
    RE: In x++ UTCTime

    Hi Riyas,

    Please tell us what is the requirement and share the code which you have already written.

  • Riyas ahamed F Profile Picture
    1,215 on at
    RE: In x++ UTCTime

    mo.PNG

    The field 'CreatedDateTime' is read only. A value cannot be assigned to it.

    how to resolve the issue. came again.  

  • Martin Dráb Profile Picture
    236,519 Most Valuable Professional on at
    RE: In x++ UTCTime

    That's a completely different question. Please create a new thread about assigning values to CreatedDateTime and don't forget to tell us there what business requirement you're trying to solve by this implementation.

  • Verified answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: In x++ UTCTime

    You can't modify the contents of this field. And you shouldn't. The field already contains the correct information.

    If you show this field on a form, every user sees it adjusted to their own timezone setting. The system converts it automatically.

    Is this your requirement? If not, please try to explain your requirement more clearly. Thanks!

  • Verified answer
    WillWU Profile Picture
    22,361 on at
    RE: In x++ UTCTime

    Hi Riyas ahamed F,

    You cannot update a system field once the record is been inserted, please try to put the code into the insert() method of table instead of modifiedfield() method.

    See:gfeaxblog.wordpress.com/.../

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,850

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 795 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 519 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans