Calculating date difference

  • Thread starter Thread starter rll
  • Start date Start date
R

rll

Hi

I need to calculate the number of years of service for
person(difference between Start_Date & End_Date). The result should b
in terms of years, months and days (all in one single cell). Ca
someone please help?

Thanks
 
rll said:
Hi

I need to calculate the number of years of service for a
person(difference between Start_Date & End_Date). The result should be
in terms of years, months and days (all in one single cell). Can
someone please help?

Thanks!

The problem here is that months are not all the same length. Presumably you
would consider the difference between 1st Feb 2003 and 1st March 2003 as one
month. However, what about the difference between 1st Jan 2003 and 29th Jan
2003? This is the same period (28 days), but not a complete month. If you
can define exactly what you want in all such circumstances, perhaps someone
will have a chance of helping you achieve it.
 
Give this a try:

=DATEDIF(A47,NOW(),"y")&" years, "&DATEDIF(A47,NOW(),"ym")&" months,
"&DATEDIF(A47,NOW(),"md")&" days"

This returns difference between date in A47 and "today" and will
change as the calendar day changes.
If you prefer you can substitute a 2nd cell ref with end_date for
"NOW()"
 

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

Back
Top