SEC_TO_TIME() Function in MySQL Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report SEC_TO_TIME() function : This function in MySQL is used to return a time value based on the specified seconds value. Here the returned time value will be in the format of HH:MM:SS. For example, if the specified second value is 63, this function will return "00:01:03". Syntax : SEC_TO_TIME(seconds) Parameter : This method accepts a parameter as given below : seconds - Specified seconds value. This value can be both positive or negative. Returns : It returns a time value based on the specified seconds value. Example-1 : Getting the time value of "00:00:40" from the specified parameter of 40 seconds value. SELECT SEC_TO_TIME(40); Output : 00:00:40 Example-2 : Getting the time value of "00:01:10" from the specified parameter of 70 seconds value. SELECT SEC_TO_TIME(70); Output : 00:01:10 Example-3 : Getting the time value of "01:00:04" from the specified parameter of 3604 seconds value. SELECT SEC_TO_TIME(3604); Output : 01:00:04 Application : This function is used to return a time value based on the specified seconds value. Create Quiz Comment K Kanchan_Ray Follow 0 Improve K Kanchan_Ray Follow 0 Improve Article Tags : SQL DBMS-SQL mysql Explore BasicsWhat is SQL?6 min readSQL Data Types3 min readSQL Operators5 min readSQL Commands | DDL, DQL, DML, DCL and TCL Commands4 min readSQL Database Operations3 min readSQL CREATE TABLE3 min readQueries & OperationsSQL SELECT Query3 min readSQL INSERT INTO Statement4 min readSQL UPDATE Statement3 min readSQL DELETE Statement3 min readSQL - WHERE Clause2 min readAliases in SQL2 min readSQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join)4 min readSQL CROSS JOIN1 min readSQL | Date Functions3 min readSQL | String functions6 min readData Constraints & Aggregate FunctionsSQL NOT NULL Constraint2 min readSQL PRIMARY KEY Constraint5 min readSQL Count() Function4 min readSQL SUM() Function2 min readSQL MAX() Function3 min readAVG() Function in SQL2 min readAdvanced SQL TopicsSQL Subquery5 min readWindow Functions in SQL6 min readSQL Stored Procedures7 min readSQL Triggers5 min readSQL Performance Tuning6 min readSQL TRANSACTIONS6 min readDatabase Design & SecurityIntroduction of ER Model9 min readIntroduction to Database Normalization6 min readSQL Injection11 min readSQL Data Encryption5 min readSQL Backup4 min readWhat is Object-Relational Mapping (ORM) in DBMS?7 min read Like