Latest web development tutorials

JavaScript toISOString () method

Date Object Reference JavaScript Date Object

Examples

Using the ISO standard format string Date object:

var d = new Date ();
var n = d.toISOString ();

n output:


try it"

Definition and Usage

toISOString () method can use ISO standards Date object to a string.

Change the standard known as ISO-8601, in the format: YYYY-MM-DDTHH: mm: ss.sssZ


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support toISOString () method

Note: Internet Explorer 8 and earlier versions do not support IE toISOString () method.


grammar

Date .toISOString ()

return value

Types of description
String Time and date ISO standard format

technical details

JavaScript version: 1.8


Date Object Reference JavaScript Date Object