0
0
Google Sheetsspreadsheet~10 mins

DATEDIF for differences in Google Sheets - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the formula to calculate the number of days between two dates in cells A1 and B1.

Google Sheets
=DATEDIF(A1, B1, [1])
Drag options to blanks, or click blank then click option'
A"MD"
B"Y"
C"M"
D"D"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "Y" returns years, not days.
Using "M" returns months, not days.
2fill in blank
medium

Complete the formula to find the number of complete months between dates in A2 and B2.

Google Sheets
=DATEDIF(A2, B2, [1])
Drag options to blanks, or click blank then click option'
A"M"
B"YM"
C"MD"
D"Y"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "YM" returns months ignoring years.
Using "MD" returns days ignoring months and years.
3fill in blank
hard

Fix the formula to calculate the number of days ignoring months and years between A3 and B3.

Google Sheets
=DATEDIF(A3, B3, [1])
Drag options to blanks, or click blank then click option'
A"Y"
B"MD"
C"YM"
D"D"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "D" returns total days, not ignoring months and years.
Using "YM" returns months ignoring years, not days.
4fill in blank
hard

Fill both blanks to calculate the difference in years and months between dates in A4 and B4.

Google Sheets
=DATEDIF(A4, B4, [1]) & " years and " & DATEDIF(A4, B4, [2]) & " months"
Drag options to blanks, or click blank then click option'
A"Y"
B"D"
C"YM"
D"MD"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "D" or "MD" for years or months.
Mixing up "YM" and "MD" units.
5fill in blank
hard

Fill all three blanks to calculate the difference as years, months, and days between A5 and B5.

Google Sheets
=DATEDIF(A5, B5, [1]) & " years, " & DATEDIF(A5, B5, [2]) & " months, and " & DATEDIF(A5, B5, [3]) & " days"
Drag options to blanks, or click blank then click option'
A"Y"
B"MD"
C"YM"
D"D"
Attempts:
3 left
💡 Hint
Common Mistakes
Using "D" for days ignoring months and years instead of "MD".
Mixing the order of units.