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
Release: 2023-06-03 18:59:56
forward
1272 people have browsed it

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

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!

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