Suppose that you are dealing with a text string representing a given date in php, and you want to make sure that PHP understands the date properly so that you can reformat the date as desired. The code below will show you can do this.
$inputdate = "2013-06-28 05:00"; //the initial date string
$timestamp = strtotime($inputdate); //parses the date string into unix timestamp
echo date('F d, Y h:iA', $timestamp); //converts 2013-06-28 05:00 to June 28, 2013 05:00AM