What do you want to save?
Add Code snippet
New code examples
-
Other 2022-03-27 09:35:02
object of class datetime could not be converted to int
Because $newDate is an object of type DateTime, not a string. The documentation is explicit: Returns new DateTime object formatted according to the specified format. If you want to convert from a string to DateTime back to string to change the format, c... Add solution