Date_format: Time function for formatting MySQL date,datetime,timestamp, Times, Year
From_unixtime: You can use this function to convert if the field type that holds the timestamp is int or another type, such as: From_unixtime (Create_time, '%y-%m-%d%h:%i:%s ')
Non-time Type field insertion uses the current timestamp Unix_timestamp (now ())
The conversion format is as follows:
Format Description%a abbreviated week name%b abbreviated month name%C Month, value%D Day of the month with English prefixes%Day of the D-month, value (xx- to)%E-month of the day, value (0- to)%F microseconds%H Hours (xx- at)%H Hours ( on- A)%I-Hour ( on- A)%I minute, value (xx- -)%Day of the J-year (001-366)%K Hours (0- at)%L Hours (1- A)%M Month name%M-month, value (xx- A)%p AM or PM%R time, A-hours (hh:mm:ss AM or PM)%s seconds (xx- -)%s seconds (xx- -)%T time, --hours (HH:MM:SS)%U Week (xx- -Sunday is the first day of the week%U Week (xx- -Monday is the first day of the week%V Week ( on- -Sunday was the first day of the week, with%X Use%V Week ( on- -Monday was the first day of the week, with%x Use%W Week name%W weeks of the day (0=Sunday6=Saturday)%X years, of which Sunday is the first day of the week,4Bit, with%V Use%X years, of which Monday is the first day of the week,4Bit, with%v Use%Y years,4bit%Y years,2-bit
The difference between MySQL Date_format from_unixtime