Jump to content

[SOLVED] Select DATETIME Table Row as Certain Format?


ShoeLace1291

Recommended Posts

How do I select a DATETIME row from a MySQL table as a certain format?  Since in MySQL, it's displayed as 2007-05-25 13:44:00  How would I get it to display as May 25, 2007, 1:44 P.M.?

 

$news = mysql_query("SELECT newsID,posterID,headline,message,datetime as date(M j, o, g:i A) FROM news ORDER BY newsID DESC LIMIT 5") or die("Unable to connect to news database.");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.