The toISOString() method converts a Date object into a string, using the ISO-8601 standard.
The toISOString() method converts a Date object into a string, using the ISO-8601 standard.
The format is: YYYY-MM-DDTHH:mm:ss.sssZ
Date.toISOString()
A String, representing the date and time using the ISO standard format
Return a Date object as a String, using the ISO standard:
//display the date and time as a string, using the ISO standard. var d = new Date(); var n = d.toISOString(); console.log(n);// www .j av a 2s. c o m