Get an outlook email for specific date

Hello,

I need help with understanding how to get a certain email from outlook if I know date time when it was received.

Filter property like this does not work. “[ReceivedTime] = ‘”+“4/1/2019 3:20 PM”.Format(“MM/dd/yyyy hh:mm tt”) + " '"

Hi,
You can fetch the email using header(). Use for each to read the mails and using header with if condition you can retrieve emails for the specific date.

@Kyrylo_Kondrashov

You can use the below outlook Filter .

“@SQL=”+"("+chr(34)+“urn:schemas:httpmail:subject”“like '%”+Subject+"%’)AND("+chr(34)+“urn:schemas:httpmail:datereceived”+ chr(34)+" >=‘10-12-2018’)"

“@SQL=”+"("+chr(34)+“urn:schemas:httpmail:subject”“like '%”+Subject+"%’)AND("+chr(34)+“urn:schemas:httpmail:datereceived”+ chr(34)+" >=‘10-12-2018 12:40’)"

you can try this as well

“@SQL=”+"("+chr(34)+“urn:schemas:httpmail:datereceived” = ‘12-Apr-19 12:00 AM’"

Refer the below Post for more insight

Hi
Once you have your MailMessages (System.Net.Mail) retrieved from Outlook, perhaps use a For Each activity, then for each mail item use a condition activity, like If, and check for DateTime.Parse(mail.Headers("[Date]")) = myDateTime, where myDateTime is the date you need to match. Then break out of the For Each if a match is found. Hope that helps.

Hi,
How can i get all the mails in a particular month from outlook.

Thanks you,
K.NagaRohith