PostgreSQL · Function
date_trunc
date_trunc cuts a date/time value down to a chosen precision, such as hour, day, month, or year. It returns the same general value type, with smaller fields cleared.
Last updated
Syntax
date_trunc(field, source [, time_zone])In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
date_binextractAT TIME ZONEtimestamp with time zone