Hello guys..I solved it.. might not be the simpler way but it does wat i want.
$first_date = "Wednesday 12th of July 2006 03:53:57 PM";
$second_date = "Monday 31st of July 2006 03:49:49 PM";
//convert into arrays
$firstdate = split(" ",$first_date);
$seconddate = split(" ",$second_date);
//arrays 1,3,4 elements contain day, month, year
$myfirstdate = getMonthNum($first_date[3]) . "-" . substr($first_date[1],0,2) . "-" . $cdate[4];
$myseconddate = getMonthNum($second_date[3]) . "-" . substr($second_date[1],0,2) . "-" . $seconddate[4];
//heres a small function that returns month number
function getMonthNum($month_str){
$month_num = array("January"=>"01","February"=>"02","March"=>"03","April"=>"04","May"=>"05","June"=>"06","July"=>"07","August"=>"08","September"=>"09","October"=>"10","November"=>"11","December"=>"12");
return $month_num[$month_str];
}
hope it helps others