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

# `timestamp_millis` 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 a timestamp `expr` milliseconds since UTC epoch.

## Syntax

```
timestamp_millis(expr)
```

## Arguments

* `expr`: An integral numeric expression specifying milliseconds.

## 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_millis(1230219000123);
 2008-12-25 07:30:00.123

> SELECT timestamp_millis(92233720368547758);
  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_nanos` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_nanos.md)
* [`timestamp_seconds` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/timestamp_seconds.md)
