Function Reference

CURTIME

PostgreSQL equivalent:

Returns the current time of day.

MySQL 8.1
CURTIME([fsp])

Parameters

fspINToptional
Number of fractional seconds digits from 0 to 6, 0 by default

Return value

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

Examples

Current time

MySQL 8.1
SELECT CURTIME();

Time with milliseconds

MySQL 8.1
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