if your date is MM-DD-YYYY when you get it (you would have to do error checking)
$month=substr($date,0,2);
$day=substr($date,3,2);
$year=substr($date,6,4);
echo "$year-$month-$day";
///convert it back to MM-DD-YYYY form
$yearr=substr($str,0,4);
$month=substr($str,5,2);
$day=substr($str,8,2);
echo "$month-$day-$year";