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
Check the documentation for this function in MySQL
DATE_FORMAT(date, format)
DATE_FORMAT(col, '%m/%Y')
DATE_FORMAT function
DATE_FORMAT(col,'%m/%Y')
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_date-format
use DATE_FORMAT function
http://www.mysqlformatdate.com will help you use the function properly
For IIS, I just use a function:
FUNCTION mySLQDate(xdate)
IF xdate <> "" THEN
mySLQDate = year(xdate) & "/" & month(xdate) & "/" & day(xdate)
END IF
END FUNCTION