Im trying to convert a date format of mm-dd-yyyy to yyyy-mm-dd. The latter is how it will be entered into the database.
Heres the code:
$date = $_POST['sched_date'];
$date = date('Y-m-d', strtotime($date));
For example, if date is 09-29-2007, it will format it to 09-29-2019.
Any ideas?