Convert numbers of days to year/month/day in Excel and Google Sheets

=DATEDIF(0,A2,"y")&" years " &DATEDIF(0,A2,"ym")&" months "&DATEDIF(0,A2,"md")&" days"

A2 = data cell

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.

Convert numbers of days to year/month/day in Excel

How to convert numbers of days to year/month/day in Excel?
Convert numbers of days to year/month/day in Excel

CONVERT NUMBERS OF DAYS TO YEAR/MONTH/DAY — EXCEL FORMULA AND EXAMPLE

=DATEDIF(0,A2,"y")&" years " &DATEDIF(0,A2,"ym")&" months "&DATEDIF(0,A2,"md")&" days"

  • A2 = data cell

  • DATEDIF = calculates the number of days, months or years between two dates.

    • ‘Y’: the number of complete years in a period or between start_date and end_date.

    • ‘M’: the number of complete months in a period or between start_date and end_date.

    • ‘D’: the number of days in a period or between start_date and end_date.

    • ‘MD’: the number of days in a period after subtracting whole months.

    • ‘YM’: the number of whole months in a period after subtracting whole years.

    • ‘YD’: the number of days between start_date and end_date, assuming start_date and end_date were no more than one year apart.

Convert numbers of days to year/month/day in Google Sheets

How to convert numbers of days to year/month/day in Google Sheets?
Convert numbers of days to year/month/day in Google Sheets

CONVERT NUMBER WITH TWO DECIMAL — GOOGLE SHEETS FORMULA AND EXAMPLE

=DATEDIF(0,A2,"y")&" years " &DATEDIF(0,A2,"ym")&" months "&DATEDIF(0,A2,"md")&" days"

  • A2 = data cell

  • DATEDIF = calculates the number of days, months or years between two dates.

    • ‘Y’: the number of complete years in a period or between start_date and end_date.

    • ‘M’: the number of complete months in a period or between start_date and end_date.

    • ‘D’: the number of days in a period or between start_date and end_date.

    • ‘MD’: the number of days in a period after subtracting whole months.

    • ‘YM’: the number of whole months in a period after subtracting whole years.

    • ‘YD’: the number of days between start_date and end_date, assuming start_date and end_date were no more than one year apart.