The problem with the filtering

Good day, How to filter messages by days, for example, I need to get all messages from yesterday.
Use Get outlook mail message
Here is my code:

“[ReceivedTime]>'”+ now.AddDays(-2).ToString(“MM/dd/yyyy”) +“'AND [ReceivedTime] < '”+now.ToString(“MM/dd/yyyy”) +“'”

The problem is that all messages are displayed, i.e. filtering does not work correctly, I Hope for your help

Once you got all emails as a array/list of mail messages try to apply this filter.

Good day!
What do you mean? Could you tell me?
Do I use a filter immediately when I receive messages? How to use it after receiving?

Hi Andery

GetMail.xaml (8.7 KB)