covert date to mysql date javascript code example
Example: convert datetime javascript mysql
function getTime() {
const date = new Date();
return date.getFullYear()
+ '-' +
date.getMonth()
+ '-' +
date.getDate()
+ ' ' +
date.getHours()
+ ':' +
date.getMinutes()
+ ':' +
date.getSeconds();
}