On 23/06/11 12:23 AM, Adam Balogh wrote:
hi,
you have a PM(/AM) in your date ($d[0]), so put an "A" (Uppercase Ante
meridiem and Post meridiem) format char to your $format variable.
b3ha
Thanks, Adam. Tried that and it's now throwing an error:
Catchable fatal error: Object of class DateTime could not be converted
to string in <xxx.php> on line 12
Line 12 follows the attempt at conversion
10 $format = 'd/m/Y h:i:s A';
11 $dt = DateTime::createFromFormat($format, $d[0]);
12 echo $dt,"...";
DN
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php