Revision: 25801
Updated Code
at April 9, 2010 08:46 by bradless
Updated Code
<? function convertDate($date) { $date = preg_replace('/\D/','/',$date); return date('Y-m-d',strtotime($date)); } print convertDate('11/05/1996'); //prints 1996-11-05 ?>
Revision: 25800
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 9, 2010 08:43 by bradless
Initial Code
<? function convertDate($date) { $date = preg_replace('/\D/','/',$date); return date('Y-m-d',strtotime($date)); } print convertDate('11/05/1996'); //prints 1996-11-05 ?>
Initial URL
Initial Description
This will convert dates from MM-DD-YYYY to YYYY-MM-DD (iso format)
Initial Title
convert date to YYYY-MM-DD with PHP
Initial Tags
date, convert
Initial Language
PHP