Forum Discussion
Tknerd
Dec 04, 2020Copper Contributor
Converting days into Years and Months not working for some data
Hi I have the formula below and its returning incorrect data =INT(O83/365) & " years and " &MOD(O83,12)& " months" O83 = 240 days I am getting the result of 0 Years and 0 months. Th...
sally365
Dec 04, 2020Brass Contributor
Hey Tknerd,
I'm not super familiar with the formulas you're using, but I found one that seems to work fine for me:
=DATEDIF(0,A1,"y") & " Years " & DATEDIF(0,A1,"ym") & " Months " & DATEDIF(0,A1,"md") & " Days "
Just replace A1 with the cell containing your count of days.
Here's a short article explaining it: https://www.excelhow.net/how-to-convert-days-to-years-months-days-in-excel.html
I hope this helps!