CURTIME()

Overview

Returns the current time of day in the currently active timezone.

USAGE

CURTIME([precision])

Argument Name

Description

precision

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_TIME() for an equivalent function using the UTC timezone.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT CURTIME();
+-----------+
| CURTIME() |
+-----------+
| 21:05:01  |
+-----------+
SELECT CURTIME()+0;
+-------------+
| CURTIME()+0 |
+-------------+
| 210501.0000 |
+-------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES