I'm having problems with the DATE_FORMAT function in MySQL. I have a date field in a table called tblArticles. I want to format it like: '1st Jan 2002'
I think this is '%D %b %Y'. But when I execute the quesry I get a value of NULL! what is going on? Also is there a way of naming the result of the function for example aclling it fdate or summit. Thanks.
See query below:
SELECT DATE_FORMAT('date', '%D %b %Y'), tblArticles.* FROM tblArticles, tblAType WHERE tblArticles.atid = tblAType.atid AND type != 'nw' AND type != 'fa' ORDER BY date DESC