Home > Database > Mysql Tutorial > How to convert timestamp to date and time in MySQL

How to convert timestamp to date and time in MySQL

PHPz
Release: 2023-05-29 12:43:26
forward
916 people have browsed it

FROM_UNIXTIME(unix_timestamp,format): Convert timestamp into date and time

SELECT FROM_UNIXTIME(1452959999) 
SELECT FROM_UNIXTIME(1452959999,'%Y-%m-%d %H:%i:%s')
Copy after login
-> 2016-01-16 23:59:59
-> 2016-01-16 23:59:59
Copy after login

The above is the detailed content of How to convert timestamp to date and time in MySQL. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.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