Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Ftime%2Fparsetotimestamp.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Ftime%2Fparsetotimestamp.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `parseToTimestamp`

Warning

`parseToTimestamp` is deprecated.

<!-- -->

<!-- -->

Use [\`parseTimestamp\`](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/time/parsetimestamp/.md) instead.

## Description

Returns a timestamp parsed from a date/time string with an optional format specification and time zone override. See [\`parseTimestamp\`](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/time/parsetimestamp/.md) for details.

## Syntax

Like many functions in DataPrime, `parseToTimestamp` supports<!-- --> [two notations](https://coralogix.com/docs/docs/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
parseToTimestamp(string: string, format?: string, tz?: string): timestamp
```

```
(string: string).parseToTimestamp(format?: string, tz?: string): timestamp
```

## Arguments

| Name     | Type     | Required  | Description                                        |
| -------- | -------- | --------- | -------------------------------------------------- |
| `string` | `string` | **true**  | The date/time string to parse                      |
| `format` | `string` | **false** | The format of the input string. Defaults to `auto` |
| `tz`     | `string` | **false** | A valid time zone string                           |
