Error: Object of class DateTime cannot be converted to string
I am getting the error:
$thedate = $row2['date'];
echo $thedate;
In php which is the value from the database ($ thedate) is "2015-05-05 21: 52: 31.000"
How can I format it to display it as a string in a php page? It is currently showing the error "Object of class DateTime cannot be converted to string".
+3
source to share