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, 1458🔥, 0💬
Popular Posts:
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...
How To Assign Debug Privileges to a User in Oracle? In order to run SQL Developer in debug mode, the...
How To Convert Characters to Numbers in Oracle? You can convert characters to numbers by using the T...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the on...