Home >Database >Mysql Tutorial >How to obtain system time in MySQL using NOW(), SYSDATE(), CURRENT_TIMESTAMP(), LOCALTIME() functions

How to obtain system time in MySQL using NOW(), SYSDATE(), CURRENT_TIMESTAMP(), LOCALTIME() functions

WBOY
WBOYforward
2023-06-03 18:59:561293browse

NOW(), SYSDATE(), CURRENT_TIMESTAMP(), LOCALTIME(): Get the current date and time of the system

SELECT NOW() 
SELECT SYSDATE() 
SELECT CURRENT_TIMESTAMP() 
SELECT CURRENT_TIMESTAMP 
SELECT LOCALTIME() 
SELECT LOCALTIME
-> 2016-01-16 17:44:41
-> 2016-01-16 17:44:41
-> 2016-01-16 17:44:41
-> 2016-01-16 17:44:41
-> 2016-01-16 17:44:41
-> 2016-01-16 17:44:41

The above is the detailed content of How to obtain system time in MySQL using NOW(), SYSDATE(), CURRENT_TIMESTAMP(), LOCALTIME() functions. 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