PDA

View Full Version : Arrange blog posts by date




Aranince
Nov 28, 2007, 09:56 PM
I am writing my own blog software using MySQL and PHP. Currently the way I do it is just use MySQL's datetime columndatatype and the NOW() function. But this is the least bit suitable for recalling the date and time in a somewhat easy to read format. Is there a different way to do this? I also need the date in a format that can be used with RSS.



Stampyhead
Nov 28, 2007, 11:08 PM
MySQL has a date formatting function that you call during your query and it can put the date in really any format you want. Here is a link to it on the MySQL website (http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-format). Post again if you need more help with it.

Aranince
Nov 29, 2007, 01:10 AM
Works perfectly! Thanks!