date time to date sql code example
Example 1: sql convert unix time to date
select FROM_UNIXTIME(UNIX_TIMESTAMP(),'%a %b %d %H:%i:%s UTC %Y');
Example 2: sql day from datetime
SET @@lc_time_names = 'fr_FR';
SELECT DAYNAME('2000-01-01') dayname;
+---------+
| dayname |
+---------+
| samedi |
+---------+