How to filter Get Outlook Messages on Received Date

Hi there - I’m struggling with how to create an expression which will get me just Outlook messages received in the last 5 minutes.

This below is the filter expression that I tried:

“[ReceivedTime] <= '” + Now.AddMinutes(-5).ToString(“MM/dd/yy hh:mm tt”) + “’”

But it’s definitely finding me messages received more than 5 minutes ago.

Any help with this would be extremely appreciated as I’m a bit stuck now as this is a pivotal element of my automation.

Thanks very much!

Akan

@AkanL,

First you check your system time format and whether it is 24 HRS or 12 HRS format.
If it is 24 HRS = HH
If it is 12 HRS = hh

After copy pasted below expression into Filter properties and delete single quotes and re type it again in the expression.

Try below expression:

“[ReceivedTime] > ‘”+ DateTime.Now.AddHours(-3).ToString(“dd-MM-yyy HH:mm”)+"’"

6 Likes

@lakshman - that’s worked! That is brilliant - thank you so much! I can now move on with my sequence

I have another query about a different activity actually but I’ll do another thread for that : )

Thanks again - best wishes

Akan

1 Like

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