Home > Database > Mysql Tutorial > body text

What output does the UNIX_TIMESTAMP() function produce?

PHPz
Release: 2023-09-02 13:05:06
forward
805 people have browsed it

UNIX_TIMESTAMP() 函数产生什么样的输出?

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)
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template