totn MariaDB Functions

MariaDB: CURTIME Function

This MariaDB tutorial explains how to use the MariaDB CURTIME function with syntax and examples.

Description

The MariaDB CURTIME function returns the current time.

Syntax

The syntax for the CURTIME function in MariaDB is:

CURTIME( )

Parameters or Arguments

There are no parameters or arguments for the CURTIME function.

Note

  • The CURTIME function will return the current date as a 'HH:MM:SS' format, if used in a string context.
  • The CURTIME function will return the current date as a HHMMSS format, if used in a numeric context.
  • The CURRENT_TIME function is a synonym for the CURTIME function.

Applies To

The CURTIME function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB CURTIME function examples and explore how to use the CURTIME function in MariaDB.

For example:

SELECT CURTIME();
Result: '10:50:41'

SELECT CURTIME() + 0;
Result: 105041

SELECT CURTIME() + 1;
Result: 105042