Home »
MySQL »
MySQL date/time Functions
MySQL LOCALTIMESTAMP() Function
MySQL | LOCALTIMESTAMP() Function: Learn about the LOCALTIMESTAMP() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 08, 2022
LOCALTIMESTAMP() Function
The LOCALTIMESTAMP() function is used to get the current date and time, this function is also a synonym of the NOW() function.
LOCALTIMESTAMP() Syntax
SELECT LOCALTIMESTAMP();
LOCALTIMESTAMP() Parameter(s)
- This function does not accept any parameter.
LOCALTIMESTAMP() Return Value
This function returns the current date and time as a value in 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDhhmmss format.
MySQL LOCALTIMESTAMP() Function Example 1
SELECT LOCALTIMESTAMP();
MySQL LOCALTIMESTAMP() Function Example 2
SELECT LOCALTIMESTAMP()+8;