Decimals on a date calculation

D

DianeG

I'm calculating dates using the formula b6-c6/365.25 and get an answer like
3.31 what does the .31 refer to? Is it nearly a third of a year i.e 4
months? I can't get my head around it!

Thanks for any help

diane
 
P

Pete_UK

What do B6 and C6 actually contain? Are you trying to find out how many
years there are between two dates? If so, then you will need to do this:

= (B6-C6)/365.25

Hope this helps.

Pete
 
G

Gary''s Student

Remember that if c6 contains a date c6/365.25 will give the number of years
from 1 January 1900. Any fractional part is a fraction of a year.
 
D

DianeG

Sorry I didn't explain myself fully, I did have two dates in the cells and
the calculation was written (b6-c6)/365.25 to calculate the number of years
between the dates. So if this is the case, the decimal is a fraction of the
year? .25 would be 3 months?
 
P

Peo Sjoblom

No it is 0.25 days if you mean the decimal part of 365.25

You can use this instead


=DATEDIF(B6,C6,"y")

for years and


=DATEDIF(B6,C6,"ym")


for months after the years have been stripped off


=DATEDIF(B6,C6,"md")


for days after the years and months have been stripped off

--


Regards,


Peo Sjoblom
 
D

DianeG

Thanks everybody!

DianeG said:
Sorry I didn't explain myself fully, I did have two dates in the cells and
the calculation was written (b6-c6)/365.25 to calculate the number of years
between the dates. So if this is the case, the decimal is a fraction of the
year? .25 would be 3 months?
 

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