CURTIME()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the current time of day in the currently active timezone.
USAGE
CURTIME([precision])
Argument Name | Description |
---|---|
| The number of desired decimal digits (0-6). Default: 0. |
DETAILS
CURTIME()
is a date-time function that returns the current time of day in the currently active timezone.
If the precision
argument is specified, it controls how many decimal digits of fractional seconds are included in the return value. The precision
can range from 0 to 6 and defaults to 0.
In string context, the return value is formatted as hh:mm:ss.uuuuuu
. If the requested precision
is 0, no decimal point is included in the return value.
In numeric context, the return value is formatted as hhmmss.uuuuuu
. Note that the returned value is always floating point, even when the requested precision
is 0.
See UTC_
EXAMPLES
SELECT CURTIME();
+-----------+
| CURTIME() |
+-----------+
| 21:05:01 |
+-----------+
SELECT CURTIME()+0;
+-------------+
| CURTIME()+0 |
+-------------+
| 210501.0000 |
+-------------+