gingera
asked on
PHP MYSQL: How to convert yyyy-mm-dd to dd/mm/yyyy?
Hello,
How do I convert $x from "yyyy-mm-dd" to "dd/mm/yyyy" in a PHP script?
Thanks.
How do I convert $x from "yyyy-mm-dd" to "dd/mm/yyyy" in a PHP script?
Thanks.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I have to clarify Roonaan's 1st suggestion should read:
$newDate = date('d/m/Y', strtotime('$x));
not
$newDate = date('dd/mm/YYYY', strtotime('$x));
$newDate = date('d/m/Y', strtotime('$x));
not
$newDate = date('dd/mm/YYYY', strtotime('$x));
ASKER