JavaScript Date toISOString() methodThe JavaScript date toISOString() method returns the string representation of the Date object. The returned string is in the form of simplified extended ISO format, which is always 24 or 27 characters long. SyntaxThe toISOString() method is represented by the following syntax: ReturnA Date object in the form of ISO string. JavaScript Date toISOString() method exampleHere, we will understand toISOString() method through various examples. Example 1Let's see an example to fetch the current date in the form of ISO string. Test it NowOutput: 2018-08-09T13:01:38.116Z Example 2Let's see an example to convert the specified Date object into the form of ISO string. Test it NowOutput: 1947-08-15T14:52:10.000Z
Next TopicJavaScript Date
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week