> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# DateParse

> Use the Sigma DateParse function to parse a text string representing a date in the specified format and return the equivalent ISO datetime value.

This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

The **DateParse** function parses a text string representing a date in the specified format and returns the equivalent ISO datetime value (`YYYY-MM-DD HH:MM:SS`).

If the input is a text or number value that reflects ISO (`YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`) or Unix time format, you can use the **[Date](/docs/date)** function, which doesn't require you to specify the input format.

## Syntax

```
DateParse(text, format)
```

### Function arguments

|            |                                                                |
| :--------- | :------------------------------------------------------------- |
| **text**   | (required) The text string or column of text strings to parse. |
| **format** | (required) The datetime format of the text string.             |

### Compatible format specifiers

The **DateParse** function uses the datetime formatting functionality of the connected CDW or DBMS. The following format specifiers are supported by most connections and can be used to build the datetime format string.

BigQuery doesn't support the `%L` and `%f` specifiers.

<table>
  <thead>
    <tr>
      <th>
        Format
      </th>

      <th>
        Description
      </th>

      <th>
        Example output

        <br />

        <em>(for 2018-07-08 00:34:59)</em>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>%Y</p>
      </td>

      <td>
        <p>Four-digit year</p>
      </td>

      <td>
        <p>2018</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%y</p>
      </td>

      <td>
        <p>Two-digit year</p>
      </td>

      <td>
        <p>18</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%m</p>
      </td>

      <td>
        <p>Two-digit month</p>
      </td>

      <td>
        <p>07</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%B</p>
      </td>

      <td>
        <p>Full month name</p>
      </td>

      <td>
        <p>July</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%b</p>
      </td>

      <td>
        <p>Abbreviated month name</p>
      </td>

      <td>
        <p>Jul</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%A</p>
      </td>

      <td>
        <p>Full day of week</p>
      </td>

      <td>
        <p>Sunday</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%a</p>
      </td>

      <td>
        <p>Abbreviated day of week</p>
      </td>

      <td>
        <p>Sun</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%d</p>
      </td>

      <td>
        <p>Two-digit day of month (01-31)</p>
      </td>

      <td>
        <p>08</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%H</p>
      </td>

      <td>
        <p>Two-digit hour based on 24-hour clock (00–23)</p>
      </td>

      <td>
        <p>00</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%I</p>
      </td>

      <td>
        <p>Two-digit hour based on 12-hour clock (01–12)</p>
      </td>

      <td>
        <p>12</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%M</p>
      </td>

      <td>
        <p>Two-digit minutes (00–59)</p>
      </td>

      <td>
        <p>34</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%S</p>
      </td>

      <td>
        <p>Two-digit seconds (00–59)</p>
      </td>

      <td>
        <p>59</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%p</p>
      </td>

      <td>
        <p>AM or PM</p>
      </td>

      <td>
        <p>AM</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%L</p>
      </td>

      <td>
        <p>Three-digit milliseconds (000–999)</p>
      </td>

      <td>
        <p>000</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%f</p>
      </td>

      <td>
        <p>Six-digit microseconds (000000–999999)</p>
      </td>

      <td>
        <p>000000</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%Z</p>
      </td>

      <td>
        <p>Time zone offset</p>
      </td>

      <td>
        <p>-07:00</p>
      </td>
    </tr>

    <tr>
      <td>
        <p>%%</p>
      </td>

      <td>
        <p>Percent symbol</p>
      </td>

      <td>
        <p>%</p>
      </td>
    </tr>
  </tbody>
</table>

Because two-digit years converted with the `%y` conversion are ambiguous, dates with a `%y` of 00–69 convert to 2000–2069 and dates with a `%y` of 70–99 convert to 1970–1999.

## Examples

### Example 1

```
DateParse("03-Sep-2020:03:05:13", "%d-%b-%Y:%H:%M:%S")
```

Parses the text string `"03-Sep-2020:03:05:13"` and returns the equivalent ISO datetime value `2020-09-03 03:05:13`.

### Example 2

```
DateParse([Text Date], "%d/%b/%Y:%H:%M:%S")
```

Parses text strings in the *Text Date* column using the specified format (`%d/%b/%Y:%H:%M:%S`) and returns equivalent values in ISO datetime format.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/7e8df85f5ff3e9961208bd11dd7ddb6a04301baa2c4d1972b2cd78fd72cf130f/assets/docs-images/8523d05-image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005044Z&X-Amz-Expires=604800&X-Amz-Signature=b66466afd27cc60b24c1a81ef643ab6156c2ac745ea7af96fc9a96f570153145&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

### Example 3

```
DateParse([Text Date], "%d/%b/%Y")
```

Parses text strings in the *Text Date* column using the specified format (`%d/%b/%Y`) and returns the equivalent values in ISO date time format.

![](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/ce0755b408dba7d33f590dfcb7ee13199c98d8d19ebae49ceeed98efdc7a9195/assets/docs-images/ea5efcb-image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005044Z&X-Amz-Expires=604800&X-Amz-Signature=1f07851719f3bc0292e1c019da983010153a67cec72c50386cbfb9e69ad94b36&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [Date functions overview](/docs/date-functions-overview)
* [Supported data types and formats](/docs/data-types-and-formats)
* [Date](/docs/date)