CURTIME() FUNCTION in MySQL

CURTIME() FUNCTION The MySQL CURTIME function is used to get the current time. The various versions of MySQL support the CURTIME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23.

Syntax:

CURTIME( )

Example 1:

mysql> SELECT CURTIME();

Output:

'15:30:20'

Explanation:

The current time has been returned as a result.

Example 2:

mysql> SELECT CURTIME() + 2;

Output:

153022.000000

Explanation:

The time value is 2 seconds after the current time has been returned.

Please follow and like us:
Content Protection by DMCA.com