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 SEC_TO_TIME Function

MySQL SEC_TO_TIME function is one of the MySQL Date Functions, which is to convert the user given seconds into a Time value. This SEC_TO_TIME function returns output Time in Hours:Minutes: Seconds format. The basic syntax of the SEC_TO_TIME() Function in MySQL is as shown below:

SEC_TO_TIME(Seconds);

MySQL SEC_TO_TIME function Example

The below shown queries help you understand the use of this MySQL Second to Time function. Here, we are converting different seconds value to Time.

SELECT SEC_TO_TIME(5);

SELECT SEC_TO_TIME(67);

SELECT SEC_TO_TIME(3717);
MySQL SEC_TO_TIME Function 1

In this Date Function example, we are converting seconds to the time. Next, we are adding a few seconds to that output. It means, MySQL return the output as HHMMSS format.

SELECT SEC_TO_TIME(7334);

SELECT SEC_TO_TIME(7334), SEC_TO_TIME(7334) + 0;

SELECT SEC_TO_TIME(10334), SEC_TO_TIME(10334) + 22;
MySQL SEC_TO_TIME Function 2

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