I have the following code:
$d = str_replace('at', '', '08-24-2016 at 11:18 AM');
$d = strtotime($d);
$postdate = date('Y-d-m H:i:s',$d);
echo $postdate;
It returns: 1970-01-01 00:00:00
just dates older than this. If I change it to today. It works fine. Any ideas?
Any idea how to convert that date properly?