Converting number of days to years and months

D

Dave Cobb

I want to convert the number of days in a cell (ie: 2350) to Xyears and
Ymonths. What formula to use?

Thanks,
Dave
 
R

Ron Rosenfeld

I want to convert the number of days in a cell (ie: 2350) to Xyears and
Ymonths. What formula to use?

Thanks,
Dave

You will need to define exactly what *you* mean by "years" and "months".

A year can have 365 or 366 days; and a month can have 28,29,30 or 31 days.

You could arbitrarily set a year at 365.25 days; and a month as 30 days, and
use the formula:

You could then use the formulas:

Years: =INT(N1/365.25)
and Days: =ROUND(MOD(N1,365.25),0)

But there are many other possible solutions.


--ron
 
P

Peo Sjoblom

There is not an exact way since there are leap years, if you don't care about
100% precision you can use =A1/365.25 or if you just want years without any
decimals

=YEAR(A1)-1900


Regards,

Peo Sjoblom
 
B

Bob Phillips

difficult to be precise, as it depends upon the start point, but this might
get you started

=DATEDIF(TODAY(),TODAY()+A1,"y")&" years, " &
DATEDIF(TODAY(),TODAY()+A1,"ym")&" months,
"&DATEDIF(TODAY(),TODAY()+A1,"md")&" days"
 
Top