Home >Database >Mysql Tutorial >How to get timestamp in MySQL

How to get timestamp in MySQL

WBOY
WBOYforward
2023-06-03 13:40:071204browse

UNIX_TIMESTAMP(date): Get timestamp

SELECT UNIX_TIMESTAMP() 
SELECT UNIX_TIMESTAMP(‘2016-01-16') 
SELECT UNIX_TIMESTAMP(‘2016-01-16 23:59:59')
-> 1452937627
-> 1452873600
-> 1452959999

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

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete