# SEC\_TO\_TIME

The `SEC_TO_TIME()` function returns a time object corresponding to the input second count.

## Syntax

```
SEC_TO_TIME ( sec )

```

## Arguments

* sec: an integer counting the seconds since midnight.

## Return Type

A time object.

## Examples

```sql
SELECT SEC_TO_TIME(84690);

```

```output

+--------------------+
| SEC_TO_TIME(84690) |
+--------------------+
| 23:31:30           |
+--------------------+

```

```sql
SELECT SEC_TO_TIME(-10000000);

```

```output

+------------------------+
| SEC_TO_TIME(-10000000) |
+------------------------+
| -838:59:59             |
+------------------------+
```

***

Modified at: July 14, 2026

Source: [/db/v9.1/reference/sql-reference/date-and-time-functions/sec-to-time/](https://docs.singlestore.com/db/v9.1/reference/sql-reference/date-and-time-functions/sec-to-time/)

(An index of the documentation is available at /llms.txt)
