- How do I calculate how many months until a deadline?
- Use =DATEDIF(TODAY(), deadline_date, "M") to get the number of complete months. For example, with a deadline of December 1, 2026, this returns 2 if today is September 16, 2026. Remember that DATEDIF counts complete units, so a partial month doesn't increment the count.
- What does MD mean in DATEDIF, and when would I use it?
- MD returns only the day-of-month difference, ignoring years and months. For instance, =DATEDIF("2026-06-15", "2026-08-20", "MD") returns 5 because the difference between the 15th and 20th day is 5 days. This is useful for recurring monthly tasks or when tracking days within each month.
- Can DATEDIF handle times, or only dates?
- DATEDIF works with date-time values, but it only measures at the date level and ignores any time component. If you need hour or minute precision, subtract the cells directly (=end_datetime - start_datetime) and format the result as a duration, or divide by 24 to convert to hours.
- Why am I getting an error when I use DATEDIF with my dates?
- The most common cause is that start_date is after end_date (returns #NUM!), or the date values are stored as text rather than actual dates (returns #VALUE!). Use the DATE() function to create dates, or DATEVALUE() to convert text strings to proper date values for DATEDIF to work correctly.