Collections:
SEC_TO_TIME() - Converting Seconds to Time
How to convert seconds to a time value using the SEC_TO_TIME() function?
✍: FYIcenter.com
SEC_TO_TIME(seconds) is a MySQL built-in function that
converts seconds to a time value.
For example:
SELECT SEC_TO_TIME(2378), SEC_TO_TIME(2378+1), SEC_TO_TIME(2378)+1; -- +-------------------+---------------------+---------------------+ -- | SEC_TO_TIME(2378) | SEC_TO_TIME(2378+1) | SEC_TO_TIME(2378)+1 | -- +-------------------+---------------------+---------------------+ -- | 00:39:38 | 00:39:39 | 3939 | -- +-------------------+---------------------+---------------------+
Reference information of the SEC_TO_TIME() function:
SEC_TO_TIME(seconds): tm Returns the seconds argument, converted to hours, minutes, and seconds, as a TIME value. The range of the result is constrained to that of the TIME data type. Arguments, return value and availability: seconds: Required. The seconds to be converted to time from. tm: Return value. The converted time. Available since MySQL 4.
⇒ STR_TO_DATE() - Parsing String to Datetime
2023-11-17, 1733🔥, 0💬
Popular Posts:
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an e...
How To Revise and Re-Run the Last SQL Command in Oracle? If executed a long SQL statement, found a m...
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Serve...
How To Start the Command-Line SQL*Plus in Oracle? If you Oracle server or client installed on your w...
Is PL/SQL Language Case Sensitive in Oracle? PL/SQL language is not case sensitive: Reserved words a...