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

# 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.

## Try an expression

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

### Expression

```
strptime('15/03/2024', '%d/%m/%Y')
```

### Result

```
2024-03-15 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 | 2024-03-15 00:00:00 |

## Arguments and types

```
strptime(text, format_list)
```

**text**

Text

**format**

Text

**format\_list**

List

Supported signatures (2)

```
strptime(text: VARCHAR, format-list: VARCHAR[]) → TIMESTAMP
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

[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.

](https://oplema.com/docs/strata/functions/try-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)[to\_timestamp

Convert seconds since 1970-01-01 to a timestamp with time zone.

](https://oplema.com/docs/strata/functions/to-timestamp)[date\_trunc

Round a date or timestamp down to the start of a unit such as month or year. Also available as datetrunc.

](https://oplema.com/docs/strata/functions/date-trunc)

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

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