Converting Y-m-d to a date with a Month name? [closed]

You can use createFromFormat to re-format your date. Like so:

$date = DateTime::createFromFormat('Y-m-d', '2021-12-06');
echo $date->format('Y F d');

If you want your output to be anything other than “2021 December 06”, please check PHP datetime formats for all available formatting options.