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