---
title: "try_strptime function in Strata | Oplema"
description: "Parse text into a timestamp using a format string such as %d/%m/%Y, returning NULL when it doesn't match. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/try-strptime"
updated: "2026-11-04"
---

# try\_strptime

Parse text into a timestamp using a format string such as %d/%m/%Y. Text that doesn't match returns a missing value instead of an error.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **TIMESTAMP**.

### Expression

```
try_strptime('20/09/1992', '%d/%m/%Y')
```

### Result

```
1992-09-20 00:00:00
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 1992-09-20 00:00:00 |

## Arguments and types

```
try_strptime(text, format)
```

**text**

Text

**format**

Text, List

Supported signatures (2)

```
try_strptime(text: VARCHAR, format: VARCHAR) → TIMESTAMP
try_strptime(text: VARCHAR, format: VARCHAR[]) → TIMESTAMP
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[strptime

Parse text into a timestamp using a format string such as %d/%m/%Y. Text that doesn't match raises an error; use try\_strptime to get a missing value instead.

](https://oplema.com/docs/strata/functions/strptime)[strftime

Format a date or timestamp as text using a format string such as %d/%m/%Y.

](https://oplema.com/docs/strata/functions/strftime)[get\_current\_timestamp

Return the current date and time, with time zone.

](https://oplema.com/docs/strata/functions/get-current-timestamp)[now

Return the current date and time, with time zone.

](https://oplema.com/docs/strata/functions/now)

[Browse dates & times](https://oplema.com/docs/strata/functions#dates-&-times) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/timestamp.html#try_strptimetext-format-list)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
