View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Date difference = zero?

Maybe you could just add 1 to each C3:

=DATEDIF(B3,C3+1,"y") & " years, "
& DATEDIF(B3,C3+1,"ym") & "months, "
& DATEDIF(B3,C3+1,"md") & " days"



jmj713 wrote:

I'm using this function to calculate date difference, but just stumbled upon
something that's making me think it's wrong.

Here it is: =DATEDIF(B3,C3,"y") & " years, " & DATEDIF(B3,C3,"ym") & "
months, " & DATEDIF(B3,C3,"md") & " days"

It seemed to work fine until I entered the same date into the two cells, and
what returned was: 0 years, 0 months, 0 days. This seems odd to me. Shouldn't
that be 0 years, 0 months, 1 days. Why doesn't the function count the "zero
date" as one? How should I modify it so I get an accurate result?

Thanks


--

Dave Peterson