mysql cast a timestamp as a date code example
Example 1: cast string to datetime mysql
SELECT STR_TO_DATE('2017-03-13T14:39:01.123','%Y-%m-%dT%H:%i:%s.%f');
Example 2: mysql convert timestamp to date
DATE_FORMAT(FROM_UNIXTIME(`timestamp`), '%Y-%m-%d') AS 'send_date',
%H:%i:%s