Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to get the date an...
Finance forum
Answered

How to get the date and time in x++ from json file

Posted on by 516

Hi Guys,

In JSON file I am getting the date/ time as below format.

"FromDateTime" : "/Date(-2208988800000)/"

How to get this date/time in x++.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 225,610 Super User on at
    RE: How to get the date and time in x++ from json file

    FormJsonSerializer (namely its deserializeDateTime() method) should be able to parse such a string to utcDateTime.

  • Adam123 Profile Picture
    Adam123 516 on at
    RE: How to get the date and time in x++ from json file

    Hi Andre

    Yes we need to change in this format as : 2022-04-07T15:33:58.592Z

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 287,995 Super User on at
    RE: How to get the date and time in x++ from json file

    Hi Jenifer,

    What format is used here? Usually Date/Time in JSON is handled as string, like: 2022-04-07T15:33:58.592Z

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans