Easy Tutorial
❮ Prop Video Controls Jsref Join ❯

JavaScript toISOString() Method

JavaScript Date Object

Example

Return a date string format using the ISO standard:

n Output result:


Definition and Usage

The toISOString() method converts a Date object to a string using the ISO standard.

This standard is known as ISO-8601 and the format is: YYYY-MM-DDTHH:mm:ss.sssZ


Browser Support

All major browsers support the toISOString() method.

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


Syntax

Return Value

Type Description
String Date and time in ISO standard format

Technical Details

| JavaScript Version: | 1.8 | | --- | --- |


JavaScript Date Object

❮ Prop Video Controls Jsref Join ❯