When I try to format the date of the datetime field in my mysql db and the result is echos, like this:
echo $result["date"];
but still he says, for example, 2012-01-03 10:27:53
my script looks like this:
DATE_FORMAT(date, '%a, %b, &Y')
and he should say 01, 03, 2012 (or something like that)
is the wrong “type” of the echo code that I use, I am new to the whole date_format task, so I really don't know if I will do it right.
entire request:
SELECT id, subject, DATE_FORMAT(date, '%a, %b, %Y') FROM articles ORDER BY id DESC
source
share