SEC_TO_TIME() Function in MySQL Last Updated : 03 Dec, 2020 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. Comment More infoAdvertise with us Next Article SEC_TO_TIME() Function in MySQL K Kanchan_Ray Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads UTC_TIME() function in MySQL UTC_TIME() function in MySQL is used to check current Coordinated Universal Time (UTC) time value. It returns the UTC time value in 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in string or numeric context. Syntax : UTC_TIME OR UTC_TIME() Parameter : This method does not ac 2 min read TIME() Function in MySQL The TIME() function in MySQL is used to extract the time portion from a date or datetime expression, returning the time in the format 'HH:MM'. This function is particularly useful when working with time components in databases, such as scheduling or logging systems. In this article, We will learn ab 4 min read SECOND() Function in MySQL SECOND() function in MySQL is used to return the second portion of a specified time or date-time value. The first parameter in this function will be the date/Date Time. This function returns the seconds from the given date value. The return value (seconds) will be in the range of 0 to 59. In this fu 2 min read UTC_TIMESTAMP() function in MySQL UTC_TIMESTAMP() function in MySQL is used to check current Coordinated Universal Time (UTC) date and time value. It returns the current UTC date and time value in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.uuu format, depending on whether the function is used in string or numeric context. Syntax : UTC_TI 2 min read STR_TO_DATE() function in MySQL STR_TO_DATE() : This function in MySQL helps to convert string values to date or time or DateTime values. The function will return zero (0000-00-00) if an empty string is passed as an argument. Syntax : STR_TO_DATE(string, format) Parameters : string -The string which will be converted to DateTime. 2 min read SUBDATE() function in MySQL SUBDATE() function in MySQL is used to subtracts a time value (as interval) from a given date. Syntax : SUBDATE(date, INTERVAL expr unit) Parameter : This function accepts three parameters as given below : date : First specified date. expr : The value of the time/date interval to subtract. unit : Th 2 min read SYSDATE() function in MySQL SYSDATE() function in MySQL is used to return the current date and time in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.uuuuuu format depending on the context of the function. Syntax : SYSDATE() Parameter : This method does not accept any parameter. Returns : It returns the current date and time value. Exa 1 min read TIMESTAMPDIFF() function in MYSQL TIMESTAMPDIFF() : This function in MySQL is used to return a value after subtracting a DateTime expression from another. Syntax : TIMESTAMPDIFF(unit,expr1,expr2) Parameters : It will accept three parameters. unit â It denotes the unit for the result. It can be one of the following.MICROSECOND, SECON 2 min read CURRENT_TIME() function in MySQL In MySQL, the CURRENT_TIME() function is a valuable tool for retrieving the current system time from the server, providing the exact time in hours, minutes, and seconds. It is widely used in scenarios where tracking or querying the current time is essential without needing the full date. In this art 3 min read UNIX_TIMESTAMP() function in MySQL UNIX_TIMESTAMP() : This function in MySQL helps to return a Unix timestamp. We can define a Unix timestamp as the number of seconds that have passed since â1970-01-01 00:00:00âUTC. Even if you pass the current date/time or another specified date/time, the function will return a Unix timestamp based 2 min read Like