> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PARSE_TIMESTAMP

> Parses a formatted timestamp string and returns a UTC timestamp.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

NULL format or value yields NULL. NULL timezone uses default UTC interpretation; malformed strings, invalid formats or timezones raise errors.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
parse_timestamp(format, value [, timezone])
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| format | STRING constant | Yes | Parsing pattern. Must be a constant argument. |
| value | STRING | Yes | String to parse. |
| timezone | STRING constant | No | Interpretation timezone. Must be a constant argument. Default: UTC. |

## Returns

* Type: TIMESTAMP with UTC timezone
* NULL behavior: NULL format or value yields NULL. NULL timezone uses default UTC interpretation; malformed strings, invalid formats or timezones raise errors.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Exact result | Yes |

## Usage notes

* Format is first; input string is second. Optional timezone interprets wall time before conversion to UTC.
* Formatting supports the Java-style and MySQL-style patterns described above.

## Examples

### Basic example

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT parse_timestamp('yyyy-MM-dd HH:mm:ss','2024-01-15 10:30:00') AS result;
```

| result |
| - |
| 2024-01-15 10:30:00 UTC |

### Parse a day-first date

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT parse_timestamp('dd/MM/yyyy HH:mm', '15/03/2024 10:30') AS parsed;
```

| parsed |
| - |
| 2024-03-15 10:30:00 UTC |

## Limitations

* Format and time-zone arguments must be constant STRING values. They cannot vary by row.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.