March 25th, 2013, 03:01 AM
DATE_FORMAT() is a MySQL function.
(which has examples)
 Maybe you need a little more help than just that.
SELECT *, DATE_FORMAT(`datetime`, '%M %D %Y') FROM News ORDER BY `datetime` DESC
1) Don't use an ID to sort things. Especially when you have a more appropriate field available.
2) If you only want one row then do a LIMIT 1. Yes, that means two separate queries. (Or one string that you add " LIMIT 1" to before executing.)
Last edited by requinix : March 25th, 2013 at 03:06 AM.