How can I get the current date in Javascript and format it this way "2015-03-25T12:00:00" ?
I would like to know if there is a function or method for this. I am not asking how to convert a string into another.
To be precise: .toISOString().slice(0, -5)
var d1 = new Date()
var str = d1.toISOString().slice(0, -5)
console.log(str);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With