MySQL CURRENT_TIME() function
In MySQL, the CURRENT_TIME() returns the current time in ‘HH:MM:SS’ format or HHMMSS.uuuuuu format depending on whether numeric or string is used in the function. CURRENT_TIME() and CURRENT_TIME are the synonym of CURTIME().
Note: All of the example codes of this page will produce outputs depending upon the current time.
Syntax Diagram:
MySQL Version: 5.6
Video Presentation:
Your browser does not support HTML5 video.
Pictorial Presentation:
Example-1: MySQL CURRENT_TIME
The following statement will return the current time in ‘HH:SS:MM’ format.
Sample Output:
mysql> SELECT CURRENT_TIME; +--------------+ | CURRENT_TIME | +--------------+ | 11:35:45 | +--------------+ 1 row in set (0.00 sec)
Current time query('SELECT CURRENT_TIME') as $row) < echo ""; echo "" . $row['CURRENT_TIME'] . " "; echo " "; > ?>