Retrieve the current date and time.
| SELECT LOCALTIMESTAMP(); |
The LOCALTIMESTAMP() function retrieves the current date and time.
Note: The date and time are returned either as “YYYY-MM-DD HH-MM-SS” (string) or as YYYYMMDDHHMMSS.uuuuuu (numeric).
| LOCALTIMESTAMP() |
|
Works in: |
From MySQL version 4.0 |
Retrieve the current date and time incremented by 1.
| SELECT LOCALTIMESTAMP() + 1; |