Convert an integer to # of years-months-days

N

nli10d

I need a formula that will convert a whole number to the number of
years, days and months.
It can be arrayed in 1 or 3 columns.
Example: 4142= 11 years, 4, months and 4 days (give or take a day)
 
P

Pete_UK

With your integer in A1, put this in B1:

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

Hope this helps.

Pete
 
N

nli10d

With your integer in A1, put this in B1:

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

Hope this helps.

Pete



- Show quoted text -

That's exactly what I was looking for! Thanks a million!
 
D

Dana DeLouis

Hi. I don't know if the logic is totally correct, but this gave your
desired output...


=DATE(2000,0,4142+1)

and custom formatted as

yy "years" mm "months" dd "days"


Display:
11 years 04 months 04 days

= = = = = = = =
HTH :>)
Dana DeLouis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top