MySQL Curtime is one of the Date Function, which is used to return the current time value in HH:MM:SS or HHMMSS.uuu format. Remember, this time value is returned as per the current time zone.
In this article, we will show you, How to use this Curtime function in MySQL with example.
MySQL CURTIME Syntax
The basic syntax of the Curtime() Function in MySQL is as shown below:
MySQL CURTIME Example
The following query will show you the basic use of this curtime function.
As you can see from the above screenshot, it is showing current time in HH:MM:SS format.
Let me add 0 seconds to this Curtime() and add a custom name using Alias Name. I mean, instead of using curtime as a Numeric Value, we are using string format.
SELECT CURTIME() + 0 AS 'Time String';
The following MySQL Curtime function query will show you another example.
SELECT CURTIME(), CURTIME() + 12;
From the above screenshot, it added those 12 seconds and displaying the time in HHMMSS string format
Thank You for Visiting Our Blog