This is a discussion on using date format when I just have a numeric month within the MySQL Database forums, part of the Database Forums category; Hi, I have a MySQL 5.0 column Month int(11) (values are between 1 and 12) Year int(11) (...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I have a MySQL 5.0 column Month int(11) (values are between 1 and 12) Year int(11) (values are the 4 digit year, e.g. 2007) How can I form a SELECT statement that will take the columns above and give me something that looks like: January, 2007 ? Thanks, - Dave |
|
|||
|
<laredotornado@zipmail.com> wrote in message news:1177386958.622733.90280@n59g2000hsh.googlegro ups.com... > Hi, > > I have a MySQL 5.0 column > > Month int(11) (values are between 1 and 12) > Year int(11) (values are the 4 digit year, e.g. 2007) > > How can I form a SELECT statement that will take the columns above and > give me something that looks like: > > January, 2007 > > ? Thanks, - Dave > This works in my version.... SELECT DATE_FORMAT(CONCAT(YEAR, '-', MONTH, '-01'), '%M, %Y') FROM DATES Sean |