# `parseToTimestamp`

## Description

Warning

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

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

## Syntax

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

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

```dataprime
(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                           |
