Skip to main content
Version: V1.0.0

LOCALTIME

Declaration

LOCALTIME
LOCALTIME([scale])

Description

Returns the current date and time. LOCALTIME and LOCALTIME() are synonyms of NOW().

scale specifies the precision of the microseconds part, with valid values ranging from 0 to 6. The default value is 0.

Examples

SELECT LOCALTIME(0);
+---------------------+
| LOCALTIME(0) |
+---------------------+
| 2025-12-17 16:54:37 |
+---------------------+
1 row in set (0.001 sec)

SELECT LOCALTIME(6);
+----------------------------+
| LOCALTIME(6) |
+----------------------------+
| 2025-12-17 16:55:25.584336 |
+----------------------------+
1 row in set (0.000 sec)