Skip to content
Advertisement

Tag: date-format

How convert this date: “16/11/2020 12:00:00 a. m.” to “2020-11-16 00:00:00” with PHP?

Currently, I am requesting an external web service to get some important information. However, the dates this web services return me are something like this: 16/11/2020 12:00:00 a. m. So, I was in other implementations using a code like this to get the DateTime: But it throws this error: DateTime::__construct(): Failed to parse time string (16/11/2020 12:00:00 am) at position

Advertisement