Answers for "date.toisostring is not a function"

0

date.toisostring is not a function

Date.now() returns a number which represents the number of milliseconds elapsed since the UNIX epoch. The toISOString method cannot be called on a number, but only on a Date object, like this:

var now = new Date();
var isoString = now.toISOString();
Or in one single line:

new Date().toISOString()
Posted by: Guest on March-18-2021

Code answers related to "date.toisostring is not a function"

Browse Popular Code Answers by Language