---
title: "DATEDIF practice exercises | PracticeExcel"
description: "Practice DATEDIF in a live spreadsheet by working out an age and a length of service."
canonical_url: "https://practiceexcelonline.com/practice/datedif"
locale: en
meta:
  "og:description": "Practice DATEDIF in a live spreadsheet by working out an age and a length of service."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_DATEDIF%2Bpractice%2Bexercises%2Cdescription_Practice%2BDATEDIF%2Bin%2Ba%2Blive%2Bspreadsheet%2Bby%2Bworking%2Bout%2Ban%2Bage%2Band%2Ba%2Blength%2Bof%2Bservice.%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIkJvcm4iLCJEYXRlIiwiQWdlIl19LHsibiI6MiwiY2VsbHMiOlsiQXVnIDIwLCAxOTkwIiwiTWFyIDE1LCAyMDI0IiwiIl19XSwidGFyZ2V0IjpbMSwyXX19%2Cp_Ii9wcmFjdGljZS9kYXRlZGlmIg%2Cs_jR3Z9alt1H5-LEGO.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "DATEDIF practice exercises | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_DATEDIF%2Bpractice%2Bexercises%2Cdescription_Practice%2BDATEDIF%2Bin%2Ba%2Blive%2Bspreadsheet%2Bby%2Bworking%2Bout%2Ban%2Bage%2Band%2Ba%2Blength%2Bof%2Bservice.%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiLCJDIl0sInJvd3MiOlt7Im4iOjEsImNlbGxzIjpbIkJvcm4iLCJEYXRlIiwiQWdlIl19LHsibiI6MiwiY2VsbHMiOlsiQXVnIDIwLCAxOTkwIiwiTWFyIDE1LCAyMDI0IiwiIl19XSwidGFyZ2V0IjpbMSwyXX19%2Cp_Ii9wcmFjdGljZS9kYXRlZGlmIg%2Cs_jR3Z9alt1H5-LEGO.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **DATEDIF practice exercises**

Count the whole years or months between two dates, the way an age or years of service is counted.

[**Start the first exercise**](https://practiceexcelonline.com/practice/datedif/datedif-age)

DATEDIF(

1. [**1****Work out an age with DATEDIF**In 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.](https://practiceexcelonline.com/practice/datedif/datedif-age)
2. [**2****Months of service with DATEDIF****Premium**In C2, use DATEDIF to count the whole months of service from the hire date in A2 to the date in B2.](https://practiceexcelonline.com/practice/datedif/datedif-months-of-service)
3. [**3****Years and months of service as text****Premium**In 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".](https://practiceexcelonline.com/practice/datedif/datedif-years-and-months)

## **Functions in this topic**

- [**DATEDIF**](https://practiceexcelonline.com/functions/datedif)

## **Read the guide**

- [**Dates in Excel: how they work and the formulas you need**](https://practiceexcelonline.com/learn/excel-dates)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/practice/datedif#webpage","description":"Practice DATEDIF in a live spreadsheet by working out an age and a length of service.","name":"DATEDIF practice exercises","url":"https://practiceexcelonline.com/practice/datedif","@type":["WebPage","CollectionPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/practice/datedif#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/datedif"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/datedif#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://practiceexcelonline.com/practice","position":2},{"@type":"ListItem","name":"DATEDIF practice exercises","position":3}]},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
