All,
I need to retrieve the date in some specific format in MYSQL. For eg,
it should return month/year(10/2009).
My MYSQL version is 5.1.
Thanks, Srinivasan.
All,
I need to retrieve the date in some specific format in MYSQL. For eg,
it should return month/year(10/2009).
My MYSQL version is 5.1.
Thanks, Srinivasan.
Check the documentation for this function in MySQL
DATE_FORMAT('%m/%Y', col)
date_format(yourdatefield, '%c/%Y') as formatted_date
will do that- http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function%5Fdate-format
This website will help you format the date using the mysql date_format function http://www.mysqlformatdate.com