date_bin ( interval, timestamp, timestamp ) → timestampBin input into specified interval aligned with specified origin; see Section 9.9.3
date_bin('15 minutes', timestamp '2001-02-16 20:38:40', timestamp '2001-02-16 20:05:00') → 2001-02-16 20:35:00Functions / Date/Time Functions And Operators
Bin input into specified interval aligned with specified origin; see Section 9.9.3
Reading PG 18current·documented in 7 of 27 versions, 14 to 20
date_bin ( interval, timestamp, timestamp ) → timestampBin input into specified interval aligned with specified origin; see Section 9.9.3
date_bin('15 minutes', timestamp '2001-02-16 20:38:40', timestamp '2001-02-16 20:05:00') → 2001-02-16 20:35:00date_bin(stride, source, origin)
source is a value expression of type timestamp or timestamp with time zone. (Values of type date are cast automatically to timestamp.) stride is a value expression of type interval. The return value is likewise of type timestamp or timestamp with time zone, and it marks the beginning of the bin into which the source is placed.Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source