Forum Moderators: coopster
mysql_query("SELECT *,DATE_FORMAT [dev.mysql.com](date,'%M %d, %Y') AS new_date...
echo $row['new_date'];
dc
As is is no good if you live in the UK. Or just changing the month. The date format is different here. Displaying it as YYYY-MM-DD isn`t very easy on the eye to us Brits as its the US date format. We don`t use that format here.
Nope. Old US is MM-DD-YYYY, and old UK is DD-MM-YYYY.
Today is 07-03-2008 in one country and 03-07-2008 in the other.
In ISO 8601, it is 2008-07-03 today, as YYYY-MM-DD format, and that works because NO-ONE on the planet uses yyyy-dd-mm at all.
The UK signed into the ISO standards in 1972. The US agreed to the same formats in 1968. Most of the world had signed by the late 1980's.
It's agreed as an Internet Standard in RFC 3339 and W3C have recommended its usage for more than a decade in [w3.org...] and [w3.org...] and [w3.org...] and other places.
It's now the only date format in the official HTML 5 [w3.org...] specification.