How to get date from a timestamp in mysql?

How to get date from a timestamp in mysql?
simple you can use FROM_UNIXTIME function and pass the parameter.
my table name is messages
like this:

SELECT FROM_UNIXTIME(`created`,'%Y-%m-%d') as date FROM `messages`


Comments