I am trying to convert date formats in php.
The following code creates persistent errors
$myDate = "31/12/1980";
$myDateTime = DateTime::createFromFormat('d/m/Y', "$myDate");
$newDate = $myDateTime->format('d M Y');
echo $newDate;
The line containing createFromFormat() keeps creating the error: " "call to undefined method". This occurs both with my testing Apache server and the actual server, both running PHP 5.3+
Do I need to include or require additional files? Please help - I am only a low-intermediate in php.