How to convert seconds to TIMESTAMP in MySQL?

WBOY
Release: 2023-09-10 20:09:08
forward
759 people have browsed it

在 MySQL 中,如何将秒数转换为 TIMESTAMP?

It is completely opposite to UNIX_TIMESTAMP() and can be accomplished with the help of FROM_UNIXTIME() function. For example, 11576070 seconds would be TIMESTAMP ‘1970-05-15 05:04:30’.

mysql> Select FROM_UNIXTIME(11576070); +--------------------------------+ | FROM_UNIXTIME(11576070) | +--------------------------------+ | 1970-05-15 05:04:30 | +--------------------------------+ 1 row in set (0.00 sec)
Copy after login

The above is the detailed content of How to convert seconds to TIMESTAMP in MySQL?. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!