scalar

DATE_TRUNC

Resets less significant temporal fields to the beginning of the specified unit. Example target: PostgreSQL 17. No tables or extensions required.

Formal Syntax & Structure

sql syntaxsql
DATE_TRUNC(field,source)

Working Example

Example Snippetsql
SELECT date_trunc('month', TIMESTAMP '2024-02-29 15:30:00')::text;
SQL Reference