Home > Net >  Outlook filter support for millisecond component of time when filtering using 'httpemail:datere
Outlook filter support for millisecond component of time when filtering using 'httpemail:datere

Time:01-10

I am search Outlook using interop and I'm trying to filter emails based on date & time, including down to milliseconds, but it appears not to be supported.

I have the following filter, if I remove the sub-second component it works - it does not return anything, but with the '.1234' it is returning everything in the Inbox.

urn:schemas:httpmail:datereceived > '2023-01-09 13:22:22.1234' and urn:schemas:mailheader:subject like '%Example Test Email'

Is it possble to filter/search using sub-second values?

CodePudding user response:

Is it possble to filter/search using sub-second values?

Nope. Outlook evaluates date-time values according to the time format, short date format, and long date format settings in the Regional and Language Options applet in the Windows Control Panel. In particular, Outlook evaluates time according to that specified time format without seconds. If you specify seconds in the date-time comparison string, the filter will not operate as expected.

CodePudding user response:

Yes, both Outlook UI and OOM go though the same code that always rounds all datetime values to minutes. You'd need to use Extended MAPI (C or Delphi) or Redemption (any language, I am its author) if you want to work around that limitation.

  • Related