Alex Rivera | Logout

Format date in MySQL to return MonthName, Year

Asked 2011-11-17T02:04:15.650
8

I have rows in a table that I need to order by date. Easy enough, use the date datatype to store them, ORDER BY date blah blah.

However, I'm trying to get these rows, and easily convert the date to MonthName, Year

If I had stored a row's date as 2011-11-16, I would want to extract this (using PHP) and print out:

 November, 2011
Edit
Report

1 Answer

0

In SQL you could get

SELECT year(DBDate), month(DBDate) FROM dates ORDER BY DBDate
answered 2011-11-17T02:06:52.103

Your Answer