var aData = new Date();
var month = aData.getMonth() + 1;
var dateq = aData.getDate();
var hours = aData.getHours();
var Minutes = aData.getMinutes();
var Seconds = aData.getSeconds();
if (aData.getMonth() + 1 < 10) {
month = "0" + month;
console.log(month);
}
if (aData.getDate() < 10) {
dateq = "0" + dateq;
console.log(dateq);
}
if (aData.getHours() < 10) {
hours = "0" + hours;
console.log(hours);
}
if (aData.getMinutes() < 10) {
Minutes = "0" + Minutes;
console.log(montMinutesh);
}
if (aData.getSeconds() < 10) {
Seconds = "0" + Seconds;
console.log(Seconds);
}
var bData =
aData.getFullYear() +
"-" +
month +
"-" +
dateq +
" " +
hours +
":" +
Minutes +
":" +
Seconds;