I am using DateDiff function in vb.net sometimes it works best but sometimes return me a different value than expected. Here is my code.
intRet = DateDiff(DateInterval.Minute, dte, dtpFromTime.Value)
when this error occurs.. values of dte and appears like this..
dte==>#4/15/2010 5:00:00 PM#
dtpFromTime.Value ==> #4/15/2010 4:00:00 PM#
So the answer should be -60.. but it gives -59..
can anybody tell me what happens here..?
intRet = DateDiff(DateInterval.Minute, dte, dtpFromTime.Value)
when this error occurs.. values of dte and appears like this..
dte==>#4/15/2010 5:00:00 PM#
dtpFromTime.Value ==> #4/15/2010 4:00:00 PM#
So the answer should be -60.. but it gives -59..
can anybody tell me what happens here..?