1

In Outlook there is a concept of conversation indexes. The original email will have a conversation index like so:

01017C2A2FF4481FED6C146C98A04E2FDB77CEFE8E239603ED7DE0

According to many google searches a reply appends a datetime stamp to it 01017C2A2FF4481FED6C146C98A04E2FDB77CEFE8E239603ED7DE0800000ABF0

800000ABF0

However none of them tell you how to parse this value.

How would you get a DateTime object from that?

Reg Edit
  • 5,712
  • 1
  • 29
  • 41
The Muffin Man
  • 17,963
  • 27
  • 106
  • 187
  • Could it be a hex value in some format? Looking at the link where you got the index from; `06413958E01` is another DateTime. Perhaps anyone can see a link there? – Matthijs Jun 05 '14 at 17:25
  • In case anyone is curious the thread is here http://social.msdn.microsoft.com/Forums/office/en-US/92108fcd-0993-48ec-860d-35c419856d39/how-can-i-determine-a-new-replyforward-messages-parent-mailitem-in-an-outlook-2010-cnet-addin?forum=outlookdev&prof=required – The Muffin Man Jun 05 '14 at 17:33
  • Could it be an encrypted value perhaps? – Matthijs Jun 05 '14 at 17:37
  • Not sure, the documentation doesn't say anything about it. Ken Slovak has said in many threads that it's a datetime stamp, but fails to reveal what format it's in or how you might convert it to something readable. All that I've picked up from reading is that it's an 8-byte time stamp, which makes no sense as it's a 10 char string so that would mean it would be at least 10bytes. – The Muffin Man Jun 05 '14 at 17:39
  • Do you know in what dll the outlook-code is? Perhaps this shows some clues as to how the index gets generated. – Matthijs Jun 05 '14 at 17:43
  • 1
    800000ABF0 doesn't appear to be a Unix timestamp (if it is, it's in the 193rd century), a Javascript timestamp (it's in the year 1987), or a .NET DateTime (it would be January 1st of the year 1 AD). At 10 hex digits, it's a 5-byte value, so not enough to be a `double` value for an Excel date. – pmcoltrane Jun 05 '14 at 17:45
  • So apparently it's in file time format http://msdn.microsoft.com/en-us/library/office/cc765583.aspx but from what I'm reading file time is a 64bit integer, so let's just say I'm optimistic and I parse `800000ABF0` as a long and then convert that to a date time. I end up with 1/1/1601 7:16:51 am – The Muffin Man Jun 05 '14 at 18:28

1 Answers1

2

As you already figured out, the format is specified at http://msdn.microsoft.com/en-us/library/office/cc765583.aspx.

Note however that you cannot cast FILETIME structure to date time. FileTime is the number of ticks (1 tick = 100 nanoseconds) since 1/1/1601. One of the DateTime constructors takes ticks (8 byte integer) as a parameter.

Dmitry Streblechenko
  • 56,873
  • 3
  • 44
  • 75
  • +1, but as you say, FILETIME is ticks since 1 Jan 1601, whereas [that DateTime constructor expects ticks since 1 Jan 0001](http://msdn.microsoft.com/en-us/library/z2xf7zzk(v=vs.110).aspx), so instead use the static method [DateTime.FromFileTime](http://msdn.microsoft.com/en-us/library/system.datetime.fromfiletime(v=vs.110).aspx). – Reg Edit Jun 08 '14 at 17:17