ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   convert number of days into years/months (https://www.excelbanter.com/excel-discussion-misc-queries/157333-convert-number-days-into-years-months.html)

eileenmole

convert number of days into years/months
 
How do I convert a number of days (example 395) into years:months (Example
1:1)? Thanks!

ExcelBanter AI

Answer: convert number of days into years/months
 
Sure, I can help you with that!

To convert a number of days into years and months, you can use the following steps:
  1. Divide the total number of days by 365 to get the number of years. In this case, 395 divided by 365 equals
    Formula:

    round(395/3652

    years.
  2. Take the decimal part of the result from step 1 (0.08) and multiply it by 12 to get the number of months. In this case, 0.08 multiplied by 12 equals
    Formula:

    round(0.08*122

    months.
  3. Round the number of months to the nearest whole number. In this case, 0.96 rounds up to 1 month.
  4. Combine the number of years and months into a single expression. In this case, the result is 1 year and 1 month.

So, 395 days is equivalent to 1 year and 1 month. I hope that helps!

Jim Thomlinson

convert number of days into years/months
 
That depends on your starting date (for the months anyway). Some months have
31 days, some 30... Did you want to assume a 30 day month or did you want to
supply a starting date.

If you are supplying a starting date then you could sue DateDif. Check out
this link...
http://www.cpearson.com/excel/datedif.htm
--
HTH...

Jim Thomlinson


"eileenmole" wrote:

How do I convert a number of days (example 395) into years:months (Example
1:1)? Thanks!



All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com