Remove Seconds/ Milliseconds from Date convert to ISO String

There is no need for a library, simply set the seconds and milliseconds to zero and use the built–in toISOString method:

var d = new Date();
d.setSeconds(0,0);
document.write(d.toISOString());

Note: toISOString is not supported by IE 8 and lower, there is a pollyfil on MDN.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)