DATEDIF, NETWORKDAYS and TODAY
Three functions for working with dates:
DATEDIF(start, end, unit)gives the complete years ("Y"), months ("M") or days ("D") between two dates. It is how you calculate an age or a length of service.NETWORKDAYS(start, end)counts working days (Monday to Friday) between two dates, both included. Add a list of holidays as a third argument to skip them.TODAY()is today's date and changes every day, so anything built on it updates by itself.
Exampleexcel
Quick check
What does NETWORKDAYS count?
Your turn: write the code
Show the complete years between the two dates in C1 using DATEDIF with the unit Y.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.