Subtracting dates

Y

Yinka

Hi,

Using Excel 2000 on MS Win. XP, I want to subtract one
date from another to determine the age in yrs of an entity
on a particular day. E.g. Content of cell C2 is 08-Jan-86
and that of D2 is 05-Jan-04 if the formula in E2 is =D2-C2
the result shown is 05-Aug-17. "17" happens to be the
right age in yrs but how can I extract that number/value
from the rest of the resulting date? How does Excel in
fact compute the result 05-Aug-17?
Look forward to your help, regards, Karen
(City University, London, UK)
 
P

Peo Sjoblom

Try

=DATEDIF(C2,D2,"Y")

there is just a coincidence that you get the years,
your formula returns the days between the 2 dates and
6571 days and using excel date system that is 6571 days after year 0 which
is Jan 0 1900
so your result is the date of Dec 27 1917

the datedif formula will return the number of years

--

Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 

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