Home >Database >Mysql Tutorial >What output does the UNIX_TIMESTAMP() function produce?
Function UNIX_TIMESTAMP generates output in seconds, i.e. this function converts the specified date or datetime value into a total number of seconds.
For example, the date '1970-05-15 05:04 :30' will be converted to a total of 11576070 seconds by the UNIX_TIMESTAMP function.
mysql> select UNIX_TIMESTAMP('1970-05-15 05:04:30'); +---------------------------------------+ | UNIX_TIMESTAMP('1970-05-15 05:04:30') | +---------------------------------------+ | 11576070 | +---------------------------------------+ 1 row in set (0.09 sec)
The above is the detailed content of What output does the UNIX_TIMESTAMP() function produce?. For more information, please follow other related articles on the PHP Chinese website!