Possible Duplicate:
Convert one date format into another in PHP
I've got a string in the date format m-d-Y
, and I need it d-m-Y
. How can I do that in PHP 5.2?
The most common answer DateTime::createFromFormat()
here on stackoverflow doesn't work in PHP 5.2, and new DateTime()
+ $date->format('d-m-Y')
doesn't change the format.
Thanks,
Thew