A simple example of how to take a date and change it’s format using PHP.
August, 3 2015
to
YYYY-MM-DD
Easily done with the below code:
$old_date = 'August 3, 2015'; $new_date = date('Y-m-d', strtotime($old_date) ); echo $new_date;
A simple example of how to take a date and change it’s format using PHP.
August, 3 2015
to
YYYY-MM-DD
Easily done with the below code:
$old_date = 'August 3, 2015'; $new_date = date('Y-m-d', strtotime($old_date) ); echo $new_date;