Count complete years of service with DATEDIF
Turn a start date and a review date into whole years, the way HR counts them.
DATEDIF
Counts the complete years, months or days between two dates. Below is 1 interactive exercise that puts it to work on realistic business data — you write the formula, and get told exactly what went wrong when it does not work.
DATEDIF(start_date, end_date, "Y" | "M" | "D")
Need a refresher? Learn DATEDIF — syntax, a worked example and where it goes wrong.
Ordered from most approachable to hardest.
Counts the complete years, months or days between two dates. It belongs to the date & time family, and it shows up constantly in real work — which is why it is worth being genuinely fluent rather than merely familiar.
Before this one, it helps to be comfortable with DATE. The exercises below assume that ground is covered.
Reading about a function is not the same as being able to write it. The exercises on this page exist because the gap between recognising DATEDIF and producing it from memory, correctly, on data you have not seen before, only closes by doing it.