. Advertisement .
..3..
. Advertisement .
..4..
I am very confused about javascript format date yyyy-mm-dd hh mm ss. Can you instruct some methods that will lead to a conclusion?
Here’s the code I haven’t been able to complete yet
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0');
var yyyy = today.getFullYear();
// ??
Use toISOString() to Format Date Yyyy Mm Dd Hh Mm Ss
The truth is out there!
I trust this is what you’re looking for?
There is a simple solution