datetime create from format with datetime code example
Example: create date from string php
$element = '15-Feb-2009';
$date = DateTime::createFromFormat('j-M-Y', $element);
$element = '15-Feb-2009';
$date = DateTime::createFromFormat('j-M-Y', $element);