# make_interval

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: make_interval
latest-operator-version: v26.2.4
latest-console-tag: v3.12.0
latest-connect-version: 4.113.1
latest-redpanda-tag: v26.2.4
docname: sql/sql-functions/other-functions/make-interval
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-functions/other-functions/make-interval.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-functions/other-functions/make-interval.adoc
description: The `make_interval()` function creates an interval value from years, months, weeks, days, hours, minutes, and seconds fields.
page-topic-type: reference
page-git-created-date: "2026-09-08"
page-git-modified-date: "2026-09-08"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-functions/other-functions/make-interval.md -->

The `make_interval()` function creates an [`interval`](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-data-types/interval/) value from years, months, weeks, days, hours, minutes, and seconds fields.

## [](#syntax)Syntax

Arguments are positional. Provide as many as you need, starting from `years`; you can’t skip a field to supply a later one:

```sql
MAKE_INTERVAL()
MAKE_INTERVAL(years)
MAKE_INTERVAL(years, months)
MAKE_INTERVAL(years, months, weeks)
MAKE_INTERVAL(years, months, weeks, days)
MAKE_INTERVAL(years, months, weeks, days, hours)
MAKE_INTERVAL(years, months, weeks, days, hours, minutes)
MAKE_INTERVAL(years, months, weeks, days, hours, minutes, seconds)
```

## [](#arguments)Arguments

-   `years`, `months`, `weeks`, `days`, `hours`, `minutes`: Integers. Each defaults to `0` when omitted.

-   `seconds`: A floating-point number (supports fractional seconds). Defaults to `0` when omitted.


## [](#return-type)Return type

`interval`

## [](#examples)Examples

### [](#no-arguments)No arguments

```sql
SELECT MAKE_INTERVAL();
```

```sql
 make_interval
---------------
 00:00:00
(1 row)
```

### [](#years-and-months)Years and months

```sql
SELECT MAKE_INTERVAL(1, 6);
```

```sql
   make_interval
-------------------
 1 year 6 mons
(1 row)
```

### [](#full-set-of-fields)Full set of fields

```sql
SELECT MAKE_INTERVAL(1, 2, 3, 4, 5, 6, 7.5);
```

```sql
                make_interval
-----------------------------------------------
 1 year 2 mons 25 days 05:06:07.5
(1 row)
```