convert js date to mysql date 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();
}