0

I have a query that looks good to me but MySQL does not agree. I am using the DATE_FORMAT function and I do not see what is incorrect so I am hoping some one can point it out.

SELECT title, DATE_FORMAT(event_date '%Y-%c-%e') AS event_date FROM event WHERE event_date LIKE '2010-01'
Query : SELECT title, DATE_FORMAT(event_date '%Y-%c-%e') AS event_date FROM event WHERE event_date LIKE '2010-01' 
Error Code : 1582
Incorrect parameter count in the call to native function 'DATE_FORMAT'
Execution Time : 00:00:00:000
Transfer Time  : 00:00:00:000
Total Time     : 00:00:00:000
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by rouse
0

Hi,

You have missed the "," (comma) in the query. Modify the query as,

SELECT title, DATE_FORMAT(event_date[B],[/B]'%Y-%c-%e') AS event_date FROM event WHERE event_date LIKE '2010-01'

Good luck.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.