Convert days to years and months

h3lpme

New Member
Joined
Jul 21, 2010
Messages
29
Hello

In column H5 I have a date of 25/03/2011 and in column I5 I have the formula =TODAY()-H5 so this shows the number of days as 2085. How can I change it so it shows the number in years and months or even just years? Its a spreadsheet that shows employees years of service.

Thanks for any help
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,476
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hello

In column H5 I have a date of 25/03/2011 and in column I5 I have the formula =TODAY()-H5 so this shows the number of days as 2085. How can I change it so it shows the number in years and months or even just years? Its a spreadsheet that shows employees years of service.

Thanks for any help

divide that by 365.25 will give you the years, i.e 5.708 years

will that be enough?
 
Upvote 0

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,886
Office Version
  1. 365
Platform
  1. Windows
This will give you years:

=DATEDIF(H5,TODAY(),"y")

or use "m" if you want months. Or "ym" if you want months ignoring years.
 
Upvote 0

Macropod

Retired Moderator
Joined
Aug 27, 2007
Messages
3,677
Try:
=DATEDIF(H5,TODAY(),"y") &" years, "&DATEDIF(H5,TODAY(),"ym")&" months"
 
Last edited:
Upvote 0

h3lpme

New Member
Joined
Jul 21, 2010
Messages
29
Thanks for everyones help. Didnt expect it so quick :)

Macropod your formula was perfect, thank you
 
Upvote 0

Forum statistics

Threads
1,195,903
Messages
6,012,206
Members
441,681
Latest member
AkosiJessica

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top