Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Converting number of days to years and months
I want to convert the number of days in a cell (ie: 2350) to Xyears and
Ymonths. What formula to use? Thanks, Dave |
#2
|
|||
|
|||
=INT(A1/365)&" years "&INT(MOD(A1,365)/30)&" months"
"Dave Cobb" wrote in message news:rfLke.1280$5T2.1163@trnddc01... I want to convert the number of days in a cell (ie: 2350) to Xyears and Ymonths. What formula to use? Thanks, Dave |
#3
|
|||
|
|||
On Tue, 24 May 2005 19:28:23 GMT, "Dave Cobb" wrote:
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 |
#4
|
|||
|
|||
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 "Dave Cobb" wrote: I want to convert the number of days in a cell (ie: 2350) to Xyears and Ymonths. What formula to use? Thanks, Dave |
#5
|
|||
|
|||
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" -- HTH Bob Phillips "Dave Cobb" wrote in message news:rfLke.1280$5T2.1163@trnddc01... I want to convert the number of days in a cell (ie: 2350) to Xyears and Ymonths. What formula to use? Thanks, Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Number of years, months, days between two dates. | Excel Worksheet Functions | |||
difference between two dates in years, months and days. | Excel Worksheet Functions | |||
Where is DateDiff function in Excel 2002 ? | Excel Worksheet Functions | |||
converting months to years and months??? | Excel Discussion (Misc queries) | |||
Converting months to years | Excel Worksheet Functions |