Tutorial Gateway

  • C
  • C#
  • Python
  • SQL
  • Java
  • JS
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Go Programs
    • Python Programs
    • Java Programs
  • MySQL

MySQL CURTIME Function

MySQL Curtime function is one of the MySQL Date Functions, which is to return the current time value in HH:MM:SS or HHMMSS.uuu format. Remember, this time value returned as per the current time zone. The basic syntax of the Curtime() Function in MySQL is as shown below:

CURTIME();

MySQL CURTIME Example

The following query shows you the basic use of this curtime function.

SELECT CURTIME();
MySQL CURTIME Function 1

As you can see from the above Date Function screenshot, it is showing the 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 it as a Numeric Value, we are using MySQL string format.

SELECT CURTIME() + 0 AS 'Time String';
MySQL CURTIME Function 2

The following MySQL Curtime function query shows you another example.

SELECT CURTIME(), CURTIME() + 12;
MySQL CURTIME Function 3

From the above screenshot, it added those 12 seconds and displaying the time in HHMMSS string format

Filed Under: MySQL

  • How to Download MySQL
  • Install MySQL on Windows
  • MySQL Create Database
  • MySQL Delete Database
  • MySQL Create Table
  • MySQL Drop Table
  • MySQL SELECT Statement
  • MySQL ALIAS Column
  • MySQL Distinct
  • MySQL Insert Statement
  • MySQL Delete
  • MySQL Truncate Table
  • MySQL WHERE Clause
  • MySQL Order By
  • MySQL Group By
  • MySQL Having Clause
  • MySQL LIMIT
  • MySQL Arithmetic Operators
  • MySQL COALESCE Function
  • MySQL AND Operator
  • MySQL NOT Operator
  • MySQL OR Operator
  • MySQL XOR Operator
  • MySQL BETWEEN Operator
  • MySQL Not Between Operator
  • MySQL GREATEST Function
  • MYSQL LEAST Function
  • MySQL LIKE Operator
  • MySQL NOT LIKE Operator
  • MySQL IFNULL Operator
  • MySQL NULLIF Operator
  • MySQL INTERVAL Operator
  • MySQL IS Operator
  • MySQL IN Operator
  • MySQL NOT IN Operator
  • MySQL IS NOT NULL
  • MySQL IS NULL
  • MySQL Inner Join
  • MySQL Cross Join
  • MySQL Right Join
  • MySQL Left Join
  • MySQL Aggregate Functions
  • MySQL Date Functions
  • MySQL Date Function
  • MySQL String Functions
  • MySQL Numeric Functions

Copyright © 2021· All Rights Reserved by Suresh.
About | Contact | Privacy Policy