mysql convert datetime to date code example
Example 1: mysql convert timestamp to date
DATE_FORMAT(FROM_UNIXTIME(`timestamp`), '%Y-%m-%d') AS 'send_date',
%H:%i:%s
Example 2: date conversion in mysql column
MySQL DATE_FORMAT() formats a date as specified in the argument. A list of format specifiers given bellow may be used to format a date. The ‘%’ is required before the format specifier characters.
Syntax:
DATE_FORMAT(date,format)