Tutorial Gateway

  • C Language
  • Java
  • R
  • SQL
  • MySQL
  • Python
  • BI Tools
    • Informatica
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • QlikView
  • Js

MySQL Current Time

by suresh

MySQL Current_Time or Current_Time() are the Date Function, which are used to return the current time in HH:MM:SS or HHMMSS string format. In this article, we will show you, How to use these Current Time functions in MySQL with example.

MySQL CURRENT_TIME Syntax

The basic syntax of the Current time in MySQL is as shown below:

CURRENT_TIME;

CURRENT_TIME();

TIP: Both these functions are the synonyms of CURTIME(). All these three functions will return the same output.

MySQL CURRENT_TIME Example

The following statements shows you, how to use these MySQL Current time functions.

SELECT CURRENT_TIME;

SELECT CURRENT_TIME();

OUTPUT

MySQL Current Time Function 2

As you can see, both the above statements returns the current time in HH:MM:SS format.

Below statements show you, what happens when add few seconds to the MySQL Current_Time function.

SELECT CURRENT_TIME, CURRENT_TIME + 0, CURRENT_TIME + 5;

SELECT CURRENT_TIME(), CURRENT_TIME() + 0, CURRENT_TIME() + 32;

OUTPUT

MySQL Current Time Function 3

As you can see from the above, they added those extra seconds to current time, and displaying the current time in HHMMSS string format

Thank You for Visiting Our Blog

Placed Under: MySQL

Trending Posts

Python Program to Print Floyd’s Triangle

C Program to Print Day Name of Week

C Program to Calculate Generic Root of a Number

String Comparison in Java

C sinh Function

C tanh Function

C hypot Function

Java Program to Find Cube of a Number

Tableau Treemap

Nested If in Java Programming

  • C Programs
  • Java Programs
  • SQL FAQ’s
  • Python Programs
  • SSIS
  • Tableau
  • JavaScript

Copyright © 2019 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy