DATE_DIFF (Lakehouse v2)
Returns the difference between two dates in the specified unit.
Analyze Syntax
Section titled “Analyze Syntax”func.date_diff(<unit>, <start>, <end>)Analyze Examples
Section titled “Analyze Examples”func.date_diff('DAY', '2024-01-01', '2024-03-01')
┌────┐│ 60 │└────┘SQL Syntax
Section titled “SQL Syntax”DATE_DIFF(<unit>, <start>, <end>)SQL Examples
Section titled “SQL Examples”SELECT DATE_DIFF('DAY', '2024-01-01', '2024-03-01');
┌────┐│ 60 │└────┘