function getNowDateTime(format) {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth();
let date = now.getDate();
let day = now.getDay();
let hour = now.getHours();
let minu = now.getMinutes();
let sec = now.getSeconds();
month = month + 1;
if (month < 10) month = "0" + month;
if (date < 10) date = "0" + date;
if (hour < 10) hour = "0" + hour;
if (minu < 10) minu = "0" + minu;
if (sec < 10) sec = "0" + sec;
let time = '';
if(format == 1) {
time = year + "-" + month + "-" + date;
}
else if(format == 2) {
time = year + "-" + month + "-" + date+ " " + hour + ":" + minu + ":" + sec;
}
return time;
}