A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Summary of Difference between dates in years, months, days



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2010, 01:01 PM posted to microsoft.public.excel.misc
Mardoh
external usenet poster
 
Posts: 11
Default Summary of Difference between dates in years, months, days

I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service: ??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m "&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total length
of service.

Thanks
  #2  
Old April 17th, 2010, 01:45 PM posted to microsoft.public.excel.misc
Niek Otten
external usenet poster
 
Posts: 2,533
Default Summary of Difference between dates in years, months, days

=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mardoh" wrote in message
...
I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service: ??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m "&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total
length
of service.

Thanks


  #3  
Old April 17th, 2010, 01:59 PM posted to microsoft.public.excel.misc
David Biddulph
external usenet poster
 
Posts: 8,714
Default Summary of Difference between dates in years, months, days

And of course the whole thing gets a bit doubtful as months have different
lengths, and if you haven't got one unique starting date you don't really
know how many days to include in a month, but Niek's idea is about as good
as you can do.
--
David Biddulph


"Niek Otten" wrote in message
...
=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mardoh" wrote in message
...
I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service: ??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m "&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total
length
of service.

Thanks



  #4  
Old April 17th, 2010, 02:41 PM posted to microsoft.public.excel.misc
Mardoh
external usenet poster
 
Posts: 11
Default Summary of Difference between dates in years, months, days

Much appreciated Niek.
Thank you.

"Niek Otten" wrote:

=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mardoh" wrote in message
...
I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service: ??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m "&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total
length
of service.

Thanks


  #5  
Old April 17th, 2010, 02:46 PM posted to microsoft.public.excel.misc
Niek Otten
external usenet poster
 
Posts: 2,533
Default Summary of Difference between dates in years, months, days

Glad it helps you. But do keep David's warnings in mind!

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mardoh" wrote in message
...
Much appreciated Niek.
Thank you.

"Niek Otten" wrote:

=DATEDIF(1,B2-A2+B3-A3,"y")&"y "&DATEDIF(1,B2-A2+B3-A3,"ym")&"m
"&DATEDIF(1,B2-A2+B3-A3,"md")&"d"

Depending on how you define length you may have to add 1 to the date
difference (or to one of the dates)
Of course the formula can be shortened by using an intermediate cell for
B2-A2+B3-B2

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"mardoh" wrote in message
...
I need to calculate the difference between 2 dates and then total them.
Here's what I have so far:

From To Length of
Service
01/09/2003 31/01/2010 6y 4m 30d
01/06/2000 30/11/2002 2y 5m 29d
Total of Service:
??????????

I've used the following formula to calculate the total days worked:
=DATEDIF(A4,B4,"Y")&"y "&DATEDIF(A4,B4,"ym")&"m
"&DATEDIF(A4,B4,"md")&"d"

Problem is I don't know how to add the two together to get the total
length
of service.

Thanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.