Get Outlook mail message filtering issue with received time

Hi all,

I’m having some issues using the filter property in the get outlook mail message property. I’ve passed it this exact filter and I know there should be 20 mails returned however the activity return 0 mails to me.

“[ReceivedTime] >= ‘03/04/2021 04:03:53’ AND [ReceivedTime] <=‘03/07/2021 20:11:47’”

Anybody know whats wrong with this filter? following MM/dd/yyyy HH:mm:ss format.

Hi @Ewout

Welcome to forum

You can try like this

“[ReceivedTime] >= ‘04/03/2021 04:03:53’ AND [ReceivedTime] <=‘07/03/2021 20:11:47’”


Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

How you were getting the received time of a mail? @Ewout

1 Like

@Ewout - Please try this…

“@SQL=”“urn:schemas:httpmail:datereceived”" >= ‘2021-03-04 04:03:53’ And urn:schemas:httpmail:datereceived <= ‘2021-03-07 20:11:47’"

Note: even though my mail.header(“Date”) came out in MM/dd/yyyy HH:mm:ss format , above code worked perfectly for me…

Here is my Mail.headers(“Date”) output:


But when i tried the above provided code…it gave me 7 date list…


here is my Outlook view…(You can see, I have received only 7 emails when I used

“@SQL=”“urn:schemas:httpmail:datereceived”" >= ‘2021-03-06 00:00:01’ And urn:schemas:httpmail:datereceived <= ‘2021-03-07 23:59:59’"


1 Like

When i output the header it shows in MM/dd/yyyy HH:mm:ss format. but i am not sure how to output the ReceivedTime property of a mail object directly instead of the header info.

@NIVED_NAMBIAR , i turned the month and day around as such “[ReceivedTime] >= ‘01/03/2021 05:35:25’ AND [ReceivedTime] <= ‘06/03/2021 09:24:48’” . Sadly still no results…

@NIVED_NAMBIAR with some further trial and error i resolved it. Get outlook mail message accepted it in this format: dd/MM/yyyy HH:mm . For everyone encountering this issue: Exclude seconds from your time format to get it to work!

Credits to Nived


@prasath17 , thanks you for your elaborate response i managed to resolve it with jquery in outlook itself.

To me it seems that an SQL query would be heavier on the outlook application, what do you think?

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.