# timestamp_seconds

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: timestamp_seconds
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-functions/timestamp-functions/timestamp-seconds
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/timestamp-functions/timestamp-seconds.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/timestamp-functions/timestamp-seconds.adoc
description: The `timestamp_seconds()` function converts a given UNIX timestamp value in seconds from 1970-01-01 00:00:00 UTC into a timestamp.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/timestamp-functions/timestamp-seconds.md -->

The `timestamp_seconds()` function converts a given UNIX timestamp value in seconds from 1970-01-01 00:00:00 UTC into a timestamp. Its syntax is:

```sql
SELECT TIMESTAMP_SECONDS(int64)
```

Its input type is an `int64` expression representing a UNIX timestamp in seconds, and the return data type is a timestamp.

## [](#examples)Examples

### [](#basic-timestamp_seconds-function)Basic `timestamp_seconds()` function

This example shows how to use the `timestamp_seconds()` function to convert a given UNIX timestamp in seconds into a timestamp:

```sql
SELECT TIMESTAMP_SECONDS(1671975000) AS timestamp_secondsvalue;
```

The query returns:

```sql
+-----------------------------+
| timestamp_secondsvalue      |
+-----------------------------+
| 2022-12-25 13:30:00         |
+-----------------------------+
```

### [](#timestamp_seconds-function-using-columns)`timestamp_seconds()` function using columns

Suppose a table named **unix\_time** contains these UNIX time values in seconds:

```sql
CREATE TABLE unix_time (
  unix_time int64
);

INSERT INTO unix_time VALUES
('982384720'),
('1671975000'),
('171472000');
```

```sql
SELECT * FROM unix_time;
```

The query shows the table:

```sql
+-------------+
| unix_time   |
+-------------+
| 982384720   |
| 1671975000  |
| 171472000   |
+-------------+
```

To convert all UNIX timestamp values in seconds to timestamp values, run the query:

```sql
SELECT unix_time, TIMESTAMP_SECONDS(unix_time)
AS timestamp_value
FROM unix_time ;
```

The output displays all the entries in the table in UNIX timestamp format (in seconds) in the **unix\_time** column, and in the timestamp format without timezone in the column **timestamp\_value**.

```sql
+-------------------------+-----------------------+
| unix_time               | timestamp_value       |
+-------------------------+-----------------------+
| 982384720               | 2001-02-17 04:38:40   |
| 1671975000              | 2022-12-25 13:30:00   |
| 171472000               | 1975-06-08 15:06:40   |
+-------------------------+-----------------------+
```