sec_to_time

description

Syntax

TIME sec_to_time(INT timestamp)

The parameter is a timestamp of type INT, and the function returns a time of type TIME.

example

  1. mysql >select sec_to_time(time_to_sec(cast('16:32:18' as time)));
  2. +----------------------------------------------------+
  3. | sec_to_time(time_to_sec(CAST('16:32:18' AS TIME))) |
  4. +----------------------------------------------------+
  5. | 16:32:18 |
  6. +----------------------------------------------------+
  7. 1 row in set (0.53 sec)

keywords

  1. SEC_TO_TIME