PostgreSQL 18 reference · Date and Time Functions

PostgreSQL MAKE_DATE() Function

Build a date from year, month and day numbers. make_timestamp() and make_time() do the same for other types.

PostgreSQL 18 Since 9.4

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

make_date(year, month, day)

Parameters

ParameterDescription
year, month, day Integers.

Return value

date.

Examples

Build a date
SELECT make_date(2026, 3, 9) AS d;

Output

     d
------------
 2026-03-09
(1 row)

Run this on your computer — see “Get Started” for setup.

First day of each month
SELECT make_date(2026, m, 1) AS month_start
FROM generate_series(1, 3) AS m;

Output

 month_start
-------------
 2026-01-01
 2026-02-01
 2026-03-01
(3 rows)

Run this on your computer — see “Get Started” for setup.

Version history

VersionChange
PostgreSQL 9.4Added

Was this page helpful?