I want to change date format in my PHP MySQL but could not change.
echo ($row->PasscreationDate);?>
PasscreationDate
is the date I want to change it appear default as YYYY-MM-DD HH-MM-SS
, I want to change that date format as DD-MM-YYYY
.
I want to change date format in my PHP MySQL but could not change.
echo ($row->PasscreationDate);?>
PasscreationDate
is the date I want to change it appear default as YYYY-MM-DD HH-MM-SS
, I want to change that date format as DD-MM-YYYY
.
2
Answers
You can try
Have you tried date_format?
Example:
Source: https://www.php.net/manual/datetime.format.php