Skip to content

Returns the difference between two dates in the specified unit.

func.date_diff(<unit>, <start>, <end>)
func.date_diff('DAY', '2024-01-01', '2024-03-01')
┌────┐
60
└────┘
DATE_DIFF(<unit>, <start>, <end>)
SELECT DATE_DIFF('DAY', '2024-01-01', '2024-03-01');
┌────┐
60
└────┘