none
SentOn date in the MailItem of Outlook object model returns 4501-01-01T02:55:59 instead of 4501-01-01T12:00:00 when its not yet sent. RRS feed

  • Question

  • Hello Friends,

    SentOn date in the MailItem of Outlook object model returns 4501-01-01T02:55:59 instead of 4501-01-01T12:00:00 when its not yet sent. One of our user is facing this issue. I tried it at my end and always get correct date as 4501-01-01T12:00:00.

    So i am just wondering if its really possible that SentOn returns wrong date instead, and if yes, then how can we resolve it?

    Any inputs are highly appreciated.

    Thanks in advance.


    sureshh...

    Wednesday, December 2, 2015 4:52 PM

Answers

  • >>>Extract the year / month / day, and compare them. This means I won't be relying on time part of this datetime object anymore but only date.

    Could you point out why you need MailItem's SentOn property value? If you need detect whether MailItem was sent, you could use MailItem.Sent Property (Outlook) returns a Boolean value that indicates if a message has been sent.

    For more information, click here to refer about MailItem.Sent Property (Outlook)

    • Marked as answer by David_JunFeng Thursday, December 24, 2015 9:23 AM
    Thursday, December 17, 2015 8:12 AM

All replies

  • Hello Suresh,

    The returned value depends on the store provider. What accounts do you use? Do you both use POP3 or IMAP accounts? 

    Wednesday, December 2, 2015 5:10 PM
  • 4501-01-01 does not depend on the store provider. It is a special value returned by OOM when the underlying MAPI property is not present.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, December 3, 2015 11:08 PM
  • Sorry friends I got diverted from this thread/issue in past 2 weeks due to other issues so could not respond earlier.

    Now I am planning to go ahead and implement the solution mentioned by Dmitry in another thread.

    https://social.microsoft.com/Forums/en-US/d1aa8182-38f0-44e0-905f-30c6068b1bcb/sent-column-in-the-drafts-folder-senton-date-in-the-mailitem-of-outlook-object-model?forum=outlookdev

    Extract the year / month / day, and compare them. This means I won't be relying on time part of this datetime object anymore but only date.

    Thanks again for all your inputs.



    • Edited by sureshh Wednesday, December 16, 2015 10:19 PM update
    • Marked as answer by sureshh Thursday, December 17, 2015 3:07 AM
    • Unmarked as answer by sureshh Thursday, December 17, 2015 3:08 AM
    Wednesday, December 16, 2015 10:18 PM
  • >>>Extract the year / month / day, and compare them. This means I won't be relying on time part of this datetime object anymore but only date.

    Could you point out why you need MailItem's SentOn property value? If you need detect whether MailItem was sent, you could use MailItem.Sent Property (Outlook) returns a Boolean value that indicates if a message has been sent.

    For more information, click here to refer about MailItem.Sent Property (Outlook)

    • Marked as answer by David_JunFeng Thursday, December 24, 2015 9:23 AM
    Thursday, December 17, 2015 8:12 AM