Return to Snippet

Revision: 42525
at March 6, 2011 10:01 by munkypot


Initial Code
// From MySQL (YYYY-MM-DD) to European (DD/MM/YYYY)
$mysql_date = '2011-12-26';
$euro_date = date('d/m/Y', strtotime($mysql_date));

// From European (DD/MM/YYYY) to MySQL (YYYY-MM-DD)
$euro_date = '26/12/2011';
list($d,$m,$y) = explode('/',$euro_date); 
$mysql_date = "$y-$m-$d";

Initial URL

                                

Initial Description

                                

Initial Title
PHP - MySQL Date Conversion

Initial Tags

                                

Initial Language
PHP