---
title: DATE_PARSE
url: https://www.tines.com/docs/formulas/functions/date-parse/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# DATE_PARSE

*[View on tines.com](https://www.tines.com/docs/formulas/functions/date-parse/)*

Parses a date and returns an object representation. Fields include the iso8601 and unix timestamp representations and numerical breakdowns. Useful for parsing dates that would be otherwise ambiguous, like 01/02/2023, before passing them to DATE to be formatted. The date is parsed based on the format string, which uses the [ruby strptime (Time) syntax](https://docs.ruby-lang.org/en/3.3/Time.html#method-c-strptime). If format is omitted, DATE_PARSE attempts to guess the format. Optionally, the timezone can be specified with values from the [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

Natural language parsing is handled by [chronic](https://github.com/mojombo/chronic#examples).

**Categories:** Dates/Times

## Syntax

```
DATE_PARSE(date, format, timezone)
```

## Examples

### Example 1: Parse a date in EU format

Formula:

```
DATE_PARSE("01/02/2023", "%d/%m/%Y")
```

Output:

```json
{
  "iso8601": "2023-02-01T00:00:00+00:00",
  "iso8601_milliseconds": "2023-02-01T00:00:00.000+00:00",
  "unix_timestamp": 1675209600,
  "unix_timestamp_milliseconds": 1675209600000,
  "year": 2023,
  "month": 2,
  "month_name": "February",
  "day": 1,
  "day_of_week": 3,
  "day_name": "Wednesday",
  "hour": 0,
  "minute": 0,
  "second": 0,
  "millisecond": 0,
  "timezone": "UTC",
  "utc_offset": "+00:00",
  "utc_offset_seconds": 0
}
```

### Example 2: Parse a date in US format

Formula:

```
DATE_PARSE("01/02/2023", "%m/%d/%Y")
```

Output:

```json
{
  "iso8601": "2023-01-02T00:00:00+00:00",
  "iso8601_milliseconds": "2023-01-02T00:00:00.000+00:00",
  "unix_timestamp": 1672617600,
  "unix_timestamp_milliseconds": 1672617600000,
  "year": 2023,
  "month": 1,
  "month_name": "January",
  "day": 2,
  "day_of_week": 1,
  "day_name": "Monday",
  "hour": 0,
  "minute": 0,
  "second": 0,
  "millisecond": 0,
  "timezone": "UTC",
  "utc_offset": "+00:00",
  "utc_offset_seconds": 0
}
```

### Example 3: Parse a date in a specific timezone

Formula:

```
DATE_PARSE("2022-01-01 12:00:00", "%Y-%m-%d %H:%M:%S", "America/Los_Angeles")
```

Output:

```json
{
  "iso8601": "2022-01-01T12:00:00-08:00",
  "iso8601_milliseconds": "2022-01-01T12:00:00.000-08:00",
  "unix_timestamp": 1641067200,
  "unix_timestamp_milliseconds": 1641067200000,
  "year": 2022,
  "month": 1,
  "month_name": "January",
  "day": 1,
  "day_of_week": 6,
  "day_name": "Saturday",
  "hour": 12,
  "minute": 0,
  "second": 0,
  "millisecond": 0,
  "timezone": "PST",
  "utc_offset": "-08:00",
  "utc_offset_seconds": -28800
}
```

### Example 4: Can be passed to DATE

Formula:

```
DATE(DATE_PARSE("05/04/1994", "%d/%m/%Y"), "%B %e, %Y")
```

Output:

```json
"April 5, 1994"
```

### Example 5: Grab specific fields via dot-notation

Formula:

```
DATE_PARSE("01/02/202", "%m/%d/%Y").day_name
```

Output:

```json
"Monday"
```

### Example 6: If no format is provided, DATE_PARSE will attempt to guess the format, just like DATE

Formula:

```
DATE_PARSE("March 17, 2021").year
```

Output:

```json
2021
```

### Example 7: Accepts unix timestamps, just like DATE

Formula:

```
DATE_PARSE(1647712411).iso8601
```

Output:

```json
"2022-03-19T17:53:31+00:00"
```

### Example 8: Accepts unix timestamps in milliseconds, just like DATE

Formula:

```
DATE_PARSE(1687450077063).iso8601_milliseconds
```

Output:

```json
"2023-06-22T16:07:57.063+00:00"
```

### Example 9: Use "now" or "today" to get the current time, just like DATE

Formula:

```
DATE_PARSE("now").unix_timestamp_milliseconds
```

Output:

```json
1692791703233
```
