So when Appian writes dates to Json, it cannot cast those values correctly if it reads them back.
Do I have to manually alter the string in order to reorder the date from "YYYY-MM-DDZ" to "DD-MM-YYYYZ" before I run from Json?
Is there a reason that Appian designed it this way?
Discussion posts and replies are publicly visible
var jsonDate = new Date(1297246301973);
Then let's convert it to js format:
var date = new Date(parseInt(jsonDate.substr(6)));
The substr() function takes out the /Date( part, and the parseInt() function gets the integer and ignores the )/ at the end. The resulting number is passed into the Date constructor .
© 2023 Appian. All rights reserved.