I want to get current date and time in '2018-05-25 20:01:01' format.
I tried with javascript but I could not. How do you use angled?
I want to get current date and time in '2018-05-25 20:01:01' format.
I tried with javascript but I could not. How do you use angled?
I did it.
var d = new Date();
var strData =
d.getFullYear() + "-" +
("00" + (d.getMonth() + 1)).slice(-2) + "-" +
("00" + d.getDate()).slice(-2) + " " +
("00" + d.getHours()).slice(-2) + ":" +
("00" + d.getMinutes()).slice(-2) + ":" +
("00" + d.getSeconds()).slice(-2);