Answers for "add seconds to current time javascript"

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

js add seconds to current time

var t = new Date();
t.setSeconds(t.getSeconds() + 10);
Posted by: Guest on August-06-2021
0

how to add seconds to time in js

const date = new Date('2020-01-01 10:11:55');date.setSeconds(date.getSeconds() + 10);
Posted by: Guest on January-22-2021

Code answers related to "add seconds to current time javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language