DATE_TRUNC
Learn how to use the DATE_TRUNC date/time function in PlaidCloud Lakehouse. Truncates a date or datetime value to the specified precision.
Truncates a date or datetime value to the specified precision.
Analyze Syntax
func.date_trunc(<unit>, <datetime>)
Analyze Examples
func.date_trunc('MONTH', '2024-06-15')
┌──────────────┐
│ '2024-06-01' │
└──────────────┘
SQL Syntax
DATE_TRUNC(<unit>, <datetime>)
SQL Examples
SELECT DATE_TRUNC('MONTH', '2024-06-15');
┌────────────┐
│ 2024-06-01 │
└────────────┘