I can't figure out how to convert the date from this format: Tue Feb 06 2018 19:41:58 GMT-0500 (Eastern Standard Time)
into a format that would be accepted by MySQL DATE type.
I can convert the date with this approach in JavaScript:
var day = Date.getDate();
var month = Date.getMonth() +1;
var year = Date.getFullYear();
var DateInMySqlFormat = year + '-' + '0' + month + '-' + day;
This will work fine. But is there any way that I can convert the date Tue Feb 06 2018 19:41:58 GMT-0500 (Eastern Standard Time)
on the server side with PHP? Any help would be greatly appreciated!