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