I want to convert a date variable:
mm/dd/yyyy into yyyy/mm/dd
OR
07/01/2004 -> 2004/07/01
Thanks
$date = "07/01/2004"; $date = date("Y/m/d", strtotime($date)); echo $date;
date() and strtotime() functions should suit your needs.