DATEDIF practice exercises
Count the whole years or months between two dates, the way an age or years of service is counted.
- 1Work out an age with DATEDIFIn C2, use DATEDIF with the unit "y" to work out the age in whole years on the date in B2 of someone born on A2.
- 2Months of service with DATEDIFPremiumIn C2, use DATEDIF to count the whole months of service from the hire date in A2 to the date in B2.
- 3Years and months of service as textPremiumIn C2, show the service from A2 to B2 as "6 years, 8 months". Join DATEDIF with "y" for the whole years, the text " years, ", DATEDIF with "ym" for the months left over and " months".