---
title: "days_in_month function in Strata | Oplema"
description: "Find the number of days in the month containing a date. For example, days_in_month(DATE '1992-02-15') returns 29. Works in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/days-in-month"
updated: "2026-11-04"
---

# days\_in\_month

Find the number of days in the month containing a date.

## Try an expression

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

### Expression

```
days_in_month(DATE '1992-02-15')
```

### Result

```
29
```

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 | 29 |

## Arguments and types

```
days_in_month(date)
```

**date**

Any value

Supported signatures (1)

```
days_in_month(date: ANY)
```

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

[julian

Extract the Julian Day number from a date or timestamp.

](https://oplema.com/docs/strata/functions/julian)[month

Get the month number, from 1 to 12, from a date or timestamp.

](https://oplema.com/docs/strata/functions/month)[century

Get the century from a date or timestamp, such as 20 for 1992.

](https://oplema.com/docs/strata/functions/century)[date\_add

Move a date or timestamp forward or backward by an interval.

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

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

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