SyntaxFix
Write A Post
Hire A Developer
Questions
$timestamp = strtotime(your date variable); $new_date = date('d-m-Y', $timestamp);
For more, see the documentation for strtotime.
strtotime
Or even shorter:
$new_date = date('d-m-Y', strtotime(your date variable));