date_trunc ( text, timestamp ) → timestampTruncate to specified precision; see Section 9.9.2
date_trunc('hour', timestamp '2001-02-16 20:38:40') → 2001-02-16 20:00:00Truncate to specified precision; see Section 9.9.2
date_trunc ( text, timestamp ) → timestampTruncate to specified precision; see Section 9.9.2
date_trunc('hour', timestamp '2001-02-16 20:38:40') → 2001-02-16 20:00:00date_trunc ( text, timestamp with time zone, text ) → timestamp with time zoneTruncate to specified precision in the specified time zone; see Section 9.9.2
date_trunc('day', timestamptz '2001-02-16 20:38:40+00', 'Australia/Sydney') → 2001-02-16 13:00:00+00date_trunc ( text, interval ) → intervalTruncate to specified precision; see Section 9.9.2
date_trunc('hour', interval '2 days 3 hours 40 minutes') → 2 days 03:00:00date_trunc(field, source [, time_zone])
source is a value expression of type timestamp, timestamp with time zone, or interval. (Values of type date and time are cast automatically to timestamp or interval, respectively.) field selects to which precision to truncate the input value. The return value is likewise of type timestamp, timestamp with time zone, or interval, and it has all fields that are less significant than the selected one set to zero (or one, for day and month).Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source