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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India