How to convert timestamp to datetime and datetime to timestamp in MySQL

You can use the below functions to convert the timestamp to date and date to timestamp.

timestamp to date -> from_unixtime()
date to timestamp -> unix_timestamp()

Sample uses are as follows.

Convert Timestamp to Date in MySQL

Unformatted Display

Formatted Display

Convert Date to Timestamp in MySQL