I have a database set up where landing time requires a datetime data type, and I am trying to pull this off using javascript.
The format looks like the following in the database:
0000-00-00 00:00:00
My best attempt have been the following:
$('#landing_time').val(function(){
var d = new Date();
return d.getFullYear() + "-" + d.getMonth() + "-" + d.getDate() + " " + d.getMinutes() + ":" + d.getSeconds() + ":" + d.getMilliseconds();
});