If I key input dialog = 3
Today date = 21/01/2021
I want to read email between date 19/01/2021 - 21/01/2021
Please guide me about it.
If I key input dialog = 3
Today date = 21/01/2021
I want to read email between date 19/01/2021 - 21/01/2021
Please guide me about it.
Let’s say u have a list of mails in mail_list variable.
inputdays is the no of by which u want to move date backward
then u use below query to.filter it
mail_list.Where(Function (mail) DateTime.ParseExact(mail.Headers(“Date”),“MM/dd/yyyy HH:mm:ss”)>Now.AddDays(-inputdays) And DateTime.ParseExact(mail.Headers(“Date”),“MM/dd/yyyy HH:mm:ss”)<Now)
Try this
Regards
Nived N
Happy Automation
Can u show how the date is looking like by mail.Headers(“Date”)
Hi @fairymemay
Try this in filter property of get outlook mail message activity
“[ReceivedTime] >= '”+Now.AddDays(input).Date.ToString+“’ AND [ReceivedTime] <= ‘”+Now().Date.ToString+“’”
where input is the number of days needed to be subtracted
Regards
Nived N
Happy Automation
Hi @fairymemay
Please check the updated workflow
test read mail.xaml (6.5 KB)
I had added annotations so that u can easily understand.
Regards
Nived N
Happy Automation
Hi @fairymemay sorry for delayed response ,
Kindly check this
test read mail.xaml (7.2 KB)
Hope it helps you
Regards
Nived N
Happy Automation
did it worked?