View Single Post
  #1  
Old August 13th 08, 11:49 PM posted to microsoft.public.outlook.program_vba
Henry Stockbridge
external usenet poster
 
Posts: 10
Default DateDiff Calculation

Hi,

I am attempting to calculate the difference in dates between the date
an original email message was received, and the date a reply was
sent. However, this code returns negative numbers, despite the Date1,
and Date2 being in the right sequence.

Dim myItem As Object
Set myItem = Application.ActiveInspector.CurrentItem

DateDiff("d", Format(myItem.ReceivedTime, "Short Date"), Format(Now(),
"Short Date"))

Any thoughts?

Henry
Ads