- Categories:
Context Functions (General)
LOCALTIME¶
Returns the current time for the system.
ANSI-compliant alias for CURRENT_TIME.
Syntax¶
LOCALTIME()
LOCALTIME
Arguments¶
None.
Usage Notes¶
To comply with ANSI standards, this function can be called without parentheses.
Examples¶
Show the current local time and local timestamp:
SELECT LOCALTIME(), LOCALTIMESTAMP();Output:
+-------------+-------------------------------+ | LOCALTIME() | LOCALTIMESTAMP() | +-------------+-------------------------------+ | 17:18:02 | 2018-09-28 17:18:02.826 -0700 | +-------------+-------------------------------+