mysql cast timestamp column to date format code example
Example 1: mysql timestamp to date
-- Use the FROM_UNIXTIME() function in MySQL
select from_unixtime(timestamp) from my_tbl;
Example 2: mysql timestamp format
INSERT INTO ... VALUES ('YYYY-MM-DD HH:MM:SS');