> This page location: Date Functions > MAKE_DATE
> Full Neon documentation index: https://neon.com/docs/llms.txt

# PostgreSQL MAKE_DATE() Function

**Info:** The MAKE_DATE() function works the same across any PostgreSQL deployment, so everything here applies whether you run Postgres on your laptop, in your data center, or in the cloud. For enterprises building in the AI era, [Lakebase](https://www.databricks.com/product/lakebase) delivers the best managed Postgres experience, with strong performance, enterprise-grade security, and native integration into the Lakehouse. For developers and startups who need to ship fast and scale without friction, [Neon](https://neon.com) is the Postgres platform built for your velocity.

**Summary**: in this tutorial, you will learn how to use the PostgreSQL `MAKE_DATE()` function to generate a date value from the year, month, and day.

## Introduction to PostgreSQL MAKE_DATE() function

The `MAKE_DATE()` function allows you to construct a [date](../postgresql-tutorial/postgresql-date) value from the specified year, month, and day values.

Here's the syntax of the `MAKE_DATE()` function:

```sql
MAKE_DATE( year int, month int, day int ) → date
```

In this syntax, `year`, `month`, and `day` are the year, month, and day parts of the date. The negative year indicates BC.

The `MAKE_DATE()` function returns a value of the `DATE` type.

## PostgreSQL MAKE_DATE() function examples

Let's explore some examples of using the `MAKE_DATE()` function.

### 1) Basic PostgreSQL MAKE_DATE() function example

The following example uses the `MAKE_DATE()` function to generate the date `2024-03-25`:

```sql
SELECT MAKE_DATE(2023,3, 25);
```

Output:

```text
 make_date
------------
 2023-03-25
(1 row)
```

### 2) Using the MAKE_DATE() function with leap years

The `MAKE_DATE()` function automatically handles the leap years for you. For example, you can create a date of `February 29th` in a leap year such as `2024` as follows:

```sql
SELECT MAKE_DATE(2024, 2, 29);
```

Output:

```text
 make_date
------------
 2024-02-29
(1 row)
```

### 3) Using the MAKE_DATE() function to generate sequential dates

The following example uses the `MAKE_DATE()` function to generate a list of date values from `Jan 1, 2024` to `Jan 7, 2024`:

```sql
SELECT MAKE_DATE(2023, 1, day) dates
FROM generate_series(1, 7) AS day;
```

Output:

```text
   dates
------------
 2023-01-01
 2023-01-02
 2023-01-03
 2023-01-04
 2023-01-05
 2023-01-06
 2023-01-07
(7 rows)
```

## Summary

- Use the `MAKE_DATE()` function to generate a date value from the year, month, and day

---

## Related docs (Date Functions)

- [AGE](https://neon.com/postgresql/date-functions/age)
- [AT TIME ZONE Operator](https://neon.com/postgresql/date-functions/at-time-zone)
- [CLOCK_TIMESTAMP](https://neon.com/postgresql/date-functions/clock_timestamp)
- [CURRENT_DATE](https://neon.com/postgresql/date-functions/current_date)
- [CURRENT_TIME](https://neon.com/postgresql/date-functions/current_time)
- [CURRENT_TIMESTAMP](https://neon.com/postgresql/date-functions/current_timestamp)
- [DATE_PART](https://neon.com/postgresql/date-functions/date_part)
- [DATE_TRUNC](https://neon.com/postgresql/date-functions/date_trunc)
- [EXTRACT](https://neon.com/postgresql/date-functions/extract)
- [ISFINITE](https://neon.com/postgresql/date-functions/isfinite)
- [JUSTIFY_DAYS](https://neon.com/postgresql/date-functions/justify_days)
- [JUSTIFY_HOURS](https://neon.com/postgresql/date-functions/justify_hours)
- [JUSTIFY_INTERVAL](https://neon.com/postgresql/date-functions/justify_interval)
- [LOCALTIME](https://neon.com/postgresql/date-functions/localtime)
- [LOCALTIMESTAMP](https://neon.com/postgresql/date-functions/localtimestamp)
- [MAKE_INTERVAL](https://neon.com/postgresql/date-functions/make_interval)
- [MAKE_TIME](https://neon.com/postgresql/date-functions/make_time)
- [NOW](https://neon.com/postgresql/date-functions/now)
- [PG_SLEEP](https://neon.com/postgresql/date-functions/pg_sleep)
- [STATEMENT_TIMESTAMP](https://neon.com/postgresql/date-functions/statement_timestamp)
- [TIMEOFDAY](https://neon.com/postgresql/date-functions/timeofday)
- [TO_DATE](https://neon.com/postgresql/date-functions/to_date)
- [TO_TIMESTAMP](https://neon.com/postgresql/date-functions/to_timestamp)
