Function Reference

CURTIME

PostgreSQL equivalent:

Returns the current time of day.

MySQL 8.4
CURTIME([fsp])
  • [ ]optional part
fsp
Number of fractional seconds digits, 0 by default
INTOptional
0123456

Return value

A time (TIME) in hh:mm:ss format, with fractional seconds when fsp is set

Examples

Current time

MySQL 8.4
SELECT CURTIME();

Time with milliseconds

MySQL 8.4
SELECT CURTIME(3);

Details

The synonym is CURRENT_TIME. The time is taken in the session time zone and fixed at the start of the query. An fsp greater than 6 is an error.

See also

Where to learn