from_unixtime
Convert the UNIX timestamp to the corresponding time format of bits, and the format returned is specified by string_format
Currently, string_format
supports following formats:
Other string_format
is illegal and will returns NULL.
example
mysql> select from_unixtime(1196440219);
+---------------------------+
| from_unixtime(1196440219) |
+---------------------------+
mysql> select from_unixtime(1196440219, '%Y-%m-%d');
+-----------------------------------------+
| from_unixtime(1196440219, '%Y-%m-%d') |
+-----------------------------------------+
| 2007-12-01 |
+-----------------------------------------+
+--------------------------------------------------+
|From unixtime (1196440219,'%Y-%m-%d %H:%i:%s') |
+--------------------------------------------------+
| 2007-12-01 00:30:19 |
+--------------------------------------------------+
## keyword