0
0
Google Sheetsspreadsheet~20 mins

YEAR, MONTH, DAY extraction in Google Sheets - 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 2024-06-15 in cell A1, which formula correctly extracts the year?
A=MONTH(A1)
B=YEAR(A1)
C=DAY(A1)
D=TEXT(A1, "DD")
Attempts:
2 left
💡 Hint
The YEAR 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 2023-12-05, which formula extracts the month number correctly?
A=MONTH(B2)
B=DAY(B2)
C=YEAR(B2)
D=TEXT(B2, "MM")
Attempts:
2 left
💡 Hint
The MONTH function returns 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 "2024-07-20" (not a date). Which formula extracts the day number correctly?
A=MONTH(C3)
B=DAY(C3)
C=TEXT(C3, "DD")
D=DAY(DATEVALUE(C3))
Attempts:
2 left
💡 Hint
Convert text to date first, then extract day.
Function Choice
advanced
2:00remaining
Choose the correct formula to extract year, month, and day separately
You have a date in cell D4. Which set of formulas correctly extracts year, month, and day respectively?
AYear: =YEAR(D4), Month: =MONTH(D4), Day: =DAY(D4)
BYear: =TEXT(D4, "YYYY"), Month: =TEXT(D4, "MM"), Day: =TEXT(D4, "DD")
CYear: =MONTH(D4), Month: =DAY(D4), Day: =YEAR(D4)
DYear: =DAY(D4), Month: =YEAR(D4), Day: =MONTH(D4)
Attempts:
2 left
💡 Hint
Remember the YEAR, MONTH, and DAY functions extract parts of a date.
🎯 Scenario
expert
2:30remaining
Calculate age in years from birthdate
Cell E5 contains a birthdate (e.g., 1990-04-25). Which formula calculates the person's age in full years as of today?
A=MONTH(TODAY()) - MONTH(E5)
B=YEAR(TODAY()) - YEAR(E5)
C=DATEDIF(E5, TODAY(), "Y")
D=YEAR(E5) - YEAR(TODAY())
Attempts:
2 left
💡 Hint
Use DATEDIF to get full years between two dates.