I am trying to run the following
$d = "2015-Mar-22";
$dsd = DateTime::createFromFormat('Y-M-d H:i:s', $d . " 00:00:00");
$ds = strtotime($dsd->date);
and get
PHP Notice: Undefined property: DateTime::$date in php shell code on line 1
However, if I call var_dump($dsd)
before converting to a unix timestamp I get the correct answer:
echo strtotime($dsd->date);
1427007600
Am I missing something here?