I'm trying to parse a date time string combination to Date and Time and wanted to know if there a smarter way
Sample Data
9/3/2013 8:50:05 AM
9/4/2013 1:42:28 PM
9/11/2013 12:01:21 PM
....
Here's what I'm doing..Looking thru the list of Date Time string
<?php
$x = "9/3/2013 8:50:05 AM"
$ExDt = str_getcsv(trim($x," ");
$ExDate = $ExDt[0];
$ExTm = $ExDt[1] . " " . $ExDt[2];
$ExTime = date("H:i:s", strtotime($ExTm)); // Change to 24 hour format
echo $ExDate;
echo $ExTime;
?>
strtotime("9/3/2013 8:50:05 AM")doesnt simply work?