↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Date/Time Functions And Operators

make_timestamptz

Read the PG 18 manual

Create timestamp with time zone from year, month, day, hour, minute and seconds fields (negative years signify BC).

Reading PG 18current·documented in 14 of 27 versions, 9.4 to 20

Signatures & examples

make_timestamptz ( year int, month int, day int, hour int, min int, sec double precision [, timezone text ] ) → timestamp with time zone
Create timestamp with time zone from year, month, day, hour, minute and seconds fields (negative years signify BC). If timezone is not specified, the current time zone is used; the examples assume the session time zone is Europe/London
make_timestamptz(2013, 7, 15, 8, 15, 23.5) → 2013-07-15 08:15:23.5+01
make_timestamptz(2013, 7, 15, 8, 15, 23.5, 'America/New_York') → 2013-07-15 13:15:23.5+01
Version history 4
  1. 13 → 14 changed
  2. 12 → 13 changed
  3. 9.5 → 9.6 changed
  4. 9.3 → 9.4 added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source