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"
=DATEDIF(0,A2,"y")&" years " &DATEDIF(0,A2,"ym")&" months "&DATEDIF(0,A2,"md")&" days"
=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.
=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.