Source Code:
(back to article)
<?php $orgDate = "15-05-2020"; $date = str_replace('-"', '/', $orgDate); $newDate = date("Y/m/d", strtotime($date)); echo "New date format is: " . $newDate . " (YYYY/MM/DD)"; ?>
Result:
Report an issue