totn MariaDB Functions

MariaDB: CURRENT_TIME Function

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

Description

The MariaDB CURRENT_TIME function returns the current time.

Syntax

The syntax for the CURRENT_TIME function in MariaDB is:

CURRENT_TIME( )

Parameters or Arguments

There are no parameters or arguments for the CURRENT_TIME function.

Note

  • The CURRENT_TIME function will return the current date as a 'HH:MM:SS' format, if used in a string context.
  • The CURRENT_TIME 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 CURRENT_TIME function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

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

For example:

SELECT CURRENT_TIME();
Result: '10:42:14'

SELECT CURRENT_TIME() + 0;
Result: 104214

SELECT CURRENT_TIME() + 1;
Result: 104215