Usage
The toISOString() method is used to return string in ISO format Example: YYYY-MM-DDTHH:mm:ss.sssZ.Z is denoted as UTC timezone.
|
Syntax
dateObject.toISOString()
|
var date = new Date(2014, 7, 15, 14, 39, 7);
document.write(date.toString());
document.write(date.toISOString());
|
Output
Fri Aug 15 2014 14:39:07 GMT+0530 (India Standard Time)
2014-08-15T09:09:07.000Z
|