Contradictory results of DateDiff function

  • Thread starter Thread starter Pallavi Singh
  • Start date Start date
P

Pallavi Singh

Hello,
Could anyone plz point out that what could be the probable reason for
DateDiff function to give different answers for the same set of values.
I am using the following:
DateDiff ( "s", time1, time2)
Here 'time1' is greater than 'time2'. But the DateDiff function
sometimes returns a positive value and sometimes a negative value.
Thanks in advance,
Pallavi
 
are you really different results for the same values?

From XL/VBA Help:
If date1 refers to a later point in time than date2, the DateDiff function
returns a negative number.
 
Hello,
Sorry for wasting your time, it was a silly mistake. The dates were
different.
Thanks
P
 
Back
Top