Date Question

DDH

Well-known Member
Joined
Sep 25, 2003
Messages
513
I am trying to subtract between two date and I have something wrong and I don't what.

-----------B--------C--------------D-----------
16-----4/8/13-----------------0 Mo, 0 Da----
17-----3-30-13--------------------------------

Formula in cell D16
INT(MOD(B16-B17,365)/30)&" Mo, "&ROUND(MOD((MOD(B16-B17,365)),30),0)&" Da"

Cell D16 should say 9 Da

Thank you for your help.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
maybe something like...

=DATEDIF(B2,B1,"ym")&" Months"&" "&DATEDIF(B2,B1,"md")&" Days"
 
Upvote 0
Andrew Poulsom, Peter_SSs, Weazel, nuked - Thank you for your reply.

Andrew Poulsom - Yes I have dates in each cell (B17 - 3/30/13) (B16 - 4/8/13).
Peter_SSs - There was nothing posted?
Weazel - I tried you formula and I could not get it to work?
nuked - I need Month & Day to show.

I guess in my formula I was trying it get to caculate days and then divide a average month (30)
into it which would give the months and then the difference woould be days.
Example - (B11 - 11/3/12), (B10 - 1/20/13) answer in (E10 - 2Mo, 18 Da)

Thank you for your help.
 
Upvote 0
Andrew Poulsom - Thank you for your reply.

It is working now, I must have done something wrong before.
I am sorry for bothering all of you.

Thank you for trying to help me.
 
Upvote 0
Peter_SSs - There was nothing posted?
The word "this" in my post is underlined and is a hyperlink. Click it and you will see what I was referring to.
 
Upvote 0
Peter_SSs - Thank you for pointing that out, I blame that my old age for not seeing that.

Of course I blame a lot of things on my old age.

Thank you for your help.
 
Upvote 0

Forum statistics

Threads
1,207,090
Messages
6,076,520
Members
446,211
Latest member
b306750

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top