DATE_FORMAT() in query?
Posted: Thu Jun 13, 2002 11:22 am
Hi,
I was having some trouble with formatting dates, and found this post very useful.
http://www.devnetwork.net/forums/viewto ... light=date
It suggests using MySQL to format the dates instead of PHP, fair enough. So, I am using DATE_FORMAT() but want to know how to use it in a query. This doesn't work (the mysql_query prints the die statement).
where Date is a column name.
What to do?
Thanks.
I was having some trouble with formatting dates, and found this post very useful.
http://www.devnetwork.net/forums/viewto ... light=date
It suggests using MySQL to format the dates instead of PHP, fair enough. So, I am using DATE_FORMAT() but want to know how to use it in a query. This doesn't work (the mysql_query prints the die statement).
Code: Select all
SELECT DATE_FORMAT(Date, %e %b) FROM table;What to do?
Thanks.