Answers for "start seconds from 30...date object"

3

add 10 seconds to date javascript

var d;
d = new Date('2014-01-01 10:11:55');
alert(d.getMinutes() + ':' + d.getSeconds()); //11:55
d.setSeconds(d.getSeconds() + 10);
alert(d.getMinutes() + ':0' + d.getSeconds()); //12:05
Posted by: Guest on September-04-2020
0

return a date time object in yyyy-mm-dd hr:min:sec

const str = (new Date()).toISOString().slice(0, 19).replace(/-/g, "/").replace("T", " ");
Posted by: Guest on September-27-2020

Code answers related to "start seconds from 30...date object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language