can anybody show to to convert datetime function in to this..
mm-dd-yy hh:mm:ss Am or Pm.format:03-03-2011 3:56:46 pm
Well since this is in the php forums I assume you mean within a php script, so you could use mktime(hh,mm,ss,MM,DD,YY)
$sql_date = "2011-04-02 12:00:00";
echo date("m-d-Y h:i:s a", strtotime($sql_date));
//04-02-2011 12:00:00 pm
Where output is governed by the date formatting rules found in PHP: date - Manual