Building dates: DATE, DAYS, YEAR, MONTH: practice exercises
DATE, DAYS, YEAR, MONTH, DAY, TODAY. 5 exercises on real-looking data, each marked the moment you press Check. The first exercise is below to try now; the full lesson is part of Pro.
In D2, use DAYS to work out how many days' notice each booking gave: the days from the date it was booked to the event.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Booked by | Booked on | Event date | Days notice |
| 2 | Owen | 14/08/2026 | 27/11/2026 | |
| 3 | Rachel | 10/08/2026 | 18/11/2026 | |
| 4 | Jess | 12/06/2026 | 09/09/2026 | |
| 5 | Dev | 04/09/2026 | 17/11/2026 | |
| 6 | Sam | 30/08/2026 | 15/10/2026 | |
| 7 | Chen | 04/06/2026 | 30/08/2026 | |
| 8 | Nia | 16/06/2026 | 13/10/2026 | |
| 9 | Tanya | 13/08/2026 | 07/10/2026 | |
| 10 | Liam | 21/08/2026 | 13/10/2026 | |
| 11 | Tom | 29/08/2026 | 19/09/2026 |
How it works
DATE(year, month, day) builds a date from three numbers, and copes with months past 12: DATE(2026,13,1) is 1 January 2027. YEAR, MONTH and DAY take a date apart again.
DAYS(end, start) counts the days from one date to another, the same as end minus start. In your own workbooks, TODAY() gives today's date; here, sheets give the date in a cell so your answers can be checked.
=DATE(C2,B2,A2) =DAYS(B6,A6) =DATE(YEAR(A6),MONTH(A6)+1,1)
Dates are numbers
A date is stored as a number of days, so you can subtract one date from another. A few functions build and take apart dates:
DATE(year, month, day): three numbers in, one date out. Month 13 rolls on into next year.YEAR(date),MONTH(date),DAY(date): take one part out.DAYS(end, start): the number of days from start to end. Note the end date comes first.TODAY(): today's date, which changes every day.
Worked example: DATE
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Day | Month | Year | Date |
| 2 | 14 | 3 | 2026 | |
| 3 | 15 | 12 | 2026 | |
| 4 | ||||
| 5 | Start | End | Days | |
| 6 | 01/03/2026 | 15/03/2026 |
=DATE(C2,B2,A2)in D2. DATE wants the year first, then the month, then the day, which is the opposite way round to how we write dates in the UK.=DATE(C3,B3+1,A3)in D3. Row 3 is 15 December 2026. Add 1 to the month and you get month 13, which DATE rolls on into January of the next year: 15/01/2027.
Worked example: DAYS
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Day | Month | Year | Date |
| 2 | 14 | 3 | 2026 | |
| 3 | 15 | 12 | 2026 | |
| 4 | ||||
| 5 | Start | End | Days | |
| 6 | 01/03/2026 | 15/03/2026 |
=DAYS(B6,A6)in C6. DAYS takes the end date first. From 1 March to 15 March is 14 days, the same asB6-A6.
What you'll practise
- In D2, use DAYS to work out how many days' notice each booking gave: the days from the date it was booked to the event.
- A form stored the day, month and year of each date of birth in separate columns. In E2, use DATE to turn them into a real date.
- Invoices are paid on the first day of the month after the invoice date. In C2, use DATE, YEAR and MONTH to work out each payment date. (DATE copes with month 13.)
- Today's date is in H1. (In your own spreadsheets, TODAY() would give it.) In C2, use DAYS to work out how many days are left until each deadline.
- The social committee sends birthday cards. In C2, work out the date of each person's birthday in the year of the date in H1.