Read previous day mails (outlook)

I’m able to read current day messages, not working if i’m trying to read previous day mails

Filter used- “[ReceivedTime] = '”+now.AddDays(-1).ToShortDateString+“’”

error- Get outlook mail messages: Cannot parse condition. Error at “'03/20/2019’”.

Hi,

I think it should work:
“[ReceivedTime]= '”+now.AddDays(-1).ToShortDateString+“’”
Check is there any other thing which is making issue?

Or try this one as well:
“[Received] = '” + now.AddDays(-1).ToString(“D”) + '“”

Thanks,
Leeladhar

I tried yours it’s not working

@Loka625,

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

Based on your system time format try either of the one.

   “[ReceivedTime] > ‘”+ DateTime.Now.AddDays(-1).ToString(“dd-MM-yyy”)+"’" 

     or

   “[ReceivedTime] > ‘”+ DateTime.Now.AddDays(-1).ToString(“MM-dd-yyy”)+"’"

can you please drop me a sample XAML for reading previous day mails so I can test it on my pc

Perfect thanks it’s working now

1 Like

Thank you It’s working

@Loka625,

Please mark solution and close this thread. It will help to others who are looking for similar issue. Thanks for feedback.

where do I make change in the expression (filter) if I have a date (03/19/2019) variable, and if I want to read mails from that particular date

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