ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do get the years and days Between two dates (https://www.excelbanter.com/excel-discussion-misc-queries/45013-how-do-get-years-days-between-two-dates.html)

jhon doe

How do get the years and days Between two dates
 
if you had 5/1/2006 and 2/28/2002 how would you get 4.17?

Dave Peterson

If 5/1/2006 is in A1 and 2/28/2002 is in A2, then maybe:

=(a1-a2)/365
or
=(a1-a2)/365.25

But if you're trying to find differences between dates, you may want to take a
look at =datedif().

You can find lots of info at Chip Pearson's site:
http://www.cpearson.com/excel/datedif.htm

(=datedif() was only documented in xl2k's help.)

jhon doe wrote:

if you had 5/1/2006 and 2/28/2002 how would you get 4.17?


--

Dave Peterson


All times are GMT +1. The time now is 04:43 PM.

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