---
title: uuid_timestamp() | Tiger Data Docs
description: Extract a Postgres timestamp from a version 7 UUID
---

Since [2.23.0](https://github.com/timescale/timescaledb/releases/tag/2.23.0)

Extract a PostgreSQL timestamp with time zone from a UUIDv7 object.

`uuid` contains a millisecond unix timestamp and an optional sub-millisecond fraction. This fraction is used to construct the PostgreSQL timestamp.

![UUIDv7 structure with microsecond-precision timestamp](/docs/_astro/uuidv7-structure-microseconds.BBrmloq3.svg)

To include the sub-millisecond fraction in the returned timestamp, call [`uuid_timestamp_micros`](/docs/reference/timescaledb/uuid-functions/uuid_timestamp_micros/index.md).

## Samples

```
SELECT uuid_timestamp('019913ce-f124-7835-96c7-a2df691caa98');
```

Returns something like:

```
uuid_timestamp
----------------------------
 2025-09-04 10:19:13.316+02
```

## Arguments

The syntax is:

```
SELECT uuid_timestamp(
    uuid = <uuid>
);
```

| Name   | Type | Default | Required | Description                                   |
| ------ | ---- | ------- | -------- | --------------------------------------------- |
| `uuid` | UUID | -       | ✔        | The UUID object to extract the timestamp from |

## Returns

| Column           | Type        | Description                                                                |
| ---------------- | ----------- | -------------------------------------------------------------------------- |
| `uuid_timestamp` | TIMESTAMPTZ | The timestamp extracted from the UUIDv7 object with millisecond precision. |
