---
title: timestamp_seconds function
description: Learn the syntax of the timestamp\_seconds function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_seconds
---

# `timestamp_seconds` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Creates timestamp `expr` seconds since UTC epoch.

## Syntax

```
timestamp_seconds(expr)
```

## Arguments

* `expr`: An numeric expression specifying seconds.

## Returns

A TIMESTAMP.

If `expr` is out of the range representable as a TIMESTAMP, Databricks raises [ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/arithmetic-overflow-error-class.md).

## Common error conditions

* [ARITHMETIC\_OVERFLOW](https://docs.databricks.com/aws/en/error-messages/arithmetic-overflow-error-class.md)

## Examples

```sql
> SELECT timestamp_seconds(1230219000);
 2008-12-25 07:30:00
> SELECT timestamp_seconds(1230219000.123);
 2008-12-25 07:30:00.123

> SELECT timestamp_seconds(1230219000123123);
  Error: ARITHMETIC_OVERFLOW
```

## Related functions

* [`timestamp` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp.md)
* [`timestamp_micros` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_micros.md)
* [`timestamp_millis` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_millis.md)
* [`timestamp_nanos` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_nanos.md)
