Everything,
I need to get the date in a specific format in MYSQL. For instance,
it should return month / year (10/2009).
My version is MYSQL 5.1.
Thanks, Srinivasan.
Function DATE_FORMAT
DATE_FORMAT(col,'%m/%Y')
Check the documentation for this function in MySQL
DATE_FORMAT (date, format)
DATE_FORMAT(col, '%m/%Y')
date_format(yourdatefield, '%c/%Y') as formatted_date
will do it - http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format
For IIS, I just use the function:
FUNCTION mySLQDate(xdate) IF xdate <> "" THEN mySLQDate = year(xdate) & "/" & month(xdate) & "/" & day(xdate) END IF END FUNCTION
use function DATE_FORMAT
http://www.mysqlformatdate.com helps you use the function correctly
Source: https://habr.com/ru/post/1381608/More articles:How can I publish binary data in browsers that do not support typed arrays - javascriptSimple Java code that unexpectedly returns false when it intends to return true - javaRunning Objective-C with Ruby on Rails - ruby | fooobar.comMySQL formatting date to return MonthName, Year - sqlSegmentation Error Error - c ++Measure outbound requests per second? - linuxHow to connect to remote mongodb with php? - phpError in the console when the device does not have access to the Internet (data) - iosGoal C - how to get the current time in ISO 8601 format? - datewait_fences: Failed to get response: Error 10004003 - iosAll Articles