Example
Return current date and time:
sql
SELECT
LOCALTIMESTAMP();
Definition and Usage
The LOCALTIMESTAMP() function returns the current date and time.
Note: The date and time is returned as "YYYY-MM-DD HH-MM-SS" (string) or as YYYYMMDDHHMMSS.uuuuuu (numeric).
Syntax
text
LOCALTIMESTAMP()
Technical Details
| Works in: | From MySQL 4.0 |
|---|
More Examples
Example
Return current date and time + 1:
sql
SELECT
LOCALTIMESTAMP() + 1;