A DATEDIFF function returns the difference between the date parts of two date or time expressions— it’s a common expression in most SQL variants. DATEDIFF is most often used in analytic queries for filtering, cohorted analyses, and grouping by tenure, but it’s incredibly versatile and has a wide array of use cases.