0
0
Excelspreadsheet~20 mins

YEAR, MONTH, DAY extraction in Excel - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Date Extraction Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
1:30remaining
Extract the year from a date
Given the date in cell A1 as 2023-11-15, which formula correctly extracts the year?
A=DAY(A1)
B=MONTH(A1)
C=YEAR(A1)
D=TEXT(A1, "yyyy")
Attempts:
2 left
💡 Hint

Think about which function returns the year part of a date.

📊 Formula Result
intermediate
1:30remaining
Extract the month from a date
If cell B2 contains the date 2024-02-28, which formula returns the month number?
A=DAY(B2)
B=MONTH(B2)
C=YEAR(B2)
D=TEXT(B2, "MM-DD")
Attempts:
2 left
💡 Hint

Which function gives the month number from a date?

📊 Formula Result
advanced
2:00remaining
Extract the day from a date stored as text
Cell C3 contains the text string "2023/12/05" (not a date value). Which formula extracts the day number correctly?
A=MID(C3, 9, 2)
B=DAY(C3)
C=RIGHT(C3, 2)
D=DAY(DATEVALUE(C3))
Attempts:
2 left
💡 Hint

Text dates need to be converted to date values before using date functions.

Function Choice
advanced
2:00remaining
Choose the formula to extract year, month, and day separately
You want to extract year, month, and day from a date in cell D4. Which set of formulas is correct?
AYear: =YEAR(D4), Month: =MONTH(D4), Day: =DAY(D4)
BYear: =TEXT(D4, "DD"), Month: =TEXT(D4, "MM"), Day: =TEXT(D4, "YYYY")
CYear: =DAY(D4), Month: =YEAR(D4), Day: =MONTH(D4)
DYear: =MONTH(D4), Month: =DAY(D4), Day: =YEAR(D4)
Attempts:
2 left
💡 Hint

Remember the functions that extract each part of a date.

🎯 Scenario
expert
2:30remaining
Calculate age in years from birthdate
Cell E5 contains a birthdate. You want to calculate the person's age in full years as of today. Which formula gives the correct age?
A=DATEDIF(E5, TODAY(), "Y")
B=YEAR(TODAY()) - YEAR(E5) - (MONTH(TODAY()) < MONTH(E5))
C=YEAR(TODAY()) - YEAR(E5)
D=DATEDIF(TODAY(), E5, "Y")
Attempts:
2 left
💡 Hint

Use a function that calculates the difference in years correctly considering months and days.