Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- CONVERTING DATE FORMATS in SQL


mylungsarempty - 1:20 pm on Jun 26, 2011 (gmt 0)


Someone please tell me how to make this work?

$result = mysql_query("SELECT * FROM kabf_blog ORDER BY id DESC LIMIT 10 DATE_FORMAT(datetime,%e.%c.%y)");


The field is titled 'datetime' and what's going into the field is:

$datetime = date ("Y-m-d H:m:s");

I just want to format the date so that June 26, 2011 reads like: 6.26.11


Is that so much to ask?

Why are dates so difficult to manipulate in PHP and SQL?

Anyone with the expertise to help get me though this, I truly appreciate you..!


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4331192.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com