Welcome to WebmasterWorld Guest from 188.8.131.52
Moderators: coopster & jatar k
How do I format date that will work on both PHP 4 and 5. I want to format date from from YYYY-MM-DD to DD/MM/YYY and vice versa. Is there a built-in function?
$dt = "05/01/2008"; print date("Y-m-d", strtotime($dt));
OUTPUT is 2008-05-01
The date in $dt is in format d/m/Y
The first User Contributed Note from top addresses that issue.
[edited by: Anyango at 10:09 am (utc) on Oct. 11, 2008]
Las VegasOctober 6-8, 2015