$mydate = 5/2/2006;
list ($month, $day, $year) = split(‘[/.-]’, $mydate);
$month = str_pad($month, 2, “0”, STR_PAD_LEFT);
$day = str_pad($day, 2, “0”, STR_PAD_LEFT);
$mydate = $year . ‘-‘ . $month . ‘-‘ . $day;
echo “$mydate”;

Of course this assumes your year is already 4 digits long, you did fix your y2k issues by now… right?