This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

JSON.stringify() converts date objects into strings.

// create JavaScript object
const obj = {name: "John", today: new Date(), city: "New York"};

// create JSON string from JS object
const myJSON = JSON.stringify(obj);

// display JSON string
document.getElementById("demo").innerHTML = myJSON;

The "T" in the date string, above, stands for Time (using the 24 hour clock). The "Z" stands for Zulu (civil aviation lingo for Greenwich Mean Time [GMT] or Coordinated Universal Time [UTC]).