Question about DateDif

MyExcel

Well-known Member
Joined
Sep 25, 2008
Messages
508
when i use the difference Between tow date i add 1
for example
C1 = 1/1/2009
C2 = 15/1/2009
C3 = C2-C1+1
the result = 15
but when i use
DATEDIF(C1,C2,"d") = 14

what is the correct ????
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Neither is wrong, it just depends on your requirement. I wouldn't use DATEDIF at all for the days difference between two dates, use either

=C2-C1+1

or just

=C2-C1

Let's assume that C1 is today and C2 is tomorrow. If you want the difference to be 2, perhaps because your requirement is from the start of the first day to the end of the latter, then use the first formula

If you think the difference is 1, perhaps measuring from a specific time on one day to the same time on the other, then use tghe second formula
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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