I am trying to convert a date to month name and year.
$date = \'2017-07-00\'; $date = date(\'m/y\', strtotime($date)); echo DATE_FORMAT($date, \'%M %Y\'); >
You are not using correct parameters, use F for moth and Y for year
F
Y
Full code:
$date = '2017-07-00'; $date = date('F, Y ', strtotime($date)); echo $date;