sobota, 5 listopada 2016

PHP Catchable fatal error: Object of class DateTime could not be converted to string

SYMPTOM : PHP Catchable fatal error: Object of class DateTime could not be converted to string

SOLVE: format('Y-m-d H:i:s'); // GIVE STRING ?>
So If You want to convert from a string to DateTime back to string to change the format, call DateTime::format at the end to get a formatted string out of your DateTime.

Brak komentarzy:

Prześlij komentarz

thanks