The function date_create()accepts only the link parameter . This function is also a function of the alias.DateTime::__construct()
check date_create_from_format()its function also the function of the alias DateTime :: createFromFormat (). Refer link
$exd = date_create_from_format('j M, Y', '01 Dec, 2015');
//$exd = date_create('01 Dec, 2015');
$exd = date_format($exd, 'Y-m-d');
echo $exd;
source
share