Expression used in outlook filter
“[ReceivedTime] >= '”+ Now.AddDays(-1).Date.ToShortDateString+ " ’ AND [ReceivedTime] <= '“+ Now.Date.ToShortDateString+” '"
It is giving count of email as 5.
But actually there areonly 2 emails
Please help asap.
Hi
welcome to UiPath community
the expression looks correct
but we need to check with the property panel of GET OUTLOOK MAIL ACTIVITY whether onlyunreadmail is check and if so it will fetch only them
or
we need to check with the mail whether it has five mails from yesterday to till date
Cheers @98d5b817dcd19244c50b
1 Like
pavanh003
(Pavan Harisha)
October 15, 2019, 11:54am
3
[ReceivedTime] >=’ + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “’ AND [ReceivedTime] < '” + Now.Date.ToString(“MM/dd/yyyy”)+ “'”
try this and let us know if this helps.
Regards,
Pavan H
Hey ,it is throwing end of expression error
the expression you were using is fine
no changes in the expression we need to validate only the number of mails in outlook
@98d5b817dcd19244c50b
Fine
try with this expression
" [ReceivedTime] >= ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “ ’ AND [ReceivedTime] <= ’ ” + Now.Date.ToString(“MM/dd/yyyy”) + “ ’ ”
Cheers @98d5b817dcd19244c50b
tried this.
Today mail count is shown as 6 …actual is 4
Change either of this >= to <
" [ReceivedTime] > ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “ ’ AND [ReceivedTime] <= ’ ” + Now.Date.ToString(“MM/dd/yyyy”) + “ ’ ”
or <= to <
" [ReceivedTime] >= ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “ ’ AND [ReceivedTime] < ’ ” + Now.Date.ToString(“MM/dd/yyyy”) + “ ’ ”
try any of these and let know pls
Cheers @98d5b817dcd19244c50b
Giving wrong count for both
Abisha
(Abisha gopalan)
October 16, 2019, 9:32am
13
Hi
please try this one
“[ReceivedTime]>'”+now.AddDays(-1).ToString(“MM/dd/yyyy hh:mm tt”)+“'AND [ReceivedTime] <= ‘”+now.ToString(“MM/dd/yyyy hh:mm tt”) +“’”
and in Top property provide as int32.Maxvalue
Can I have a view on the get outlook mail activity property panel a screenshot
Is the folder mentioned is right
Because either of this expression
should work
Palaniyappan:
" [ReceivedTime] > ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “ ’ AND [ReceivedTime] <= ’ ” + Now.Date.ToString(“MM/dd/yyyy”) + “ ’ ”
or <= to <
" [ReceivedTime] >= ’ " + Now.AddDays(-1).ToString(“MM/dd/yyyy”) + “ ’ AND [ReceivedTime] < ’ ” + Now.Date.ToString(“MM/dd/yyyy”) + “ ’ ”
Cheers @98d5b817dcd19244c50b
Hi @98d5b817dcd19244c50b ,
In Filter box use the condition below -
“[ReceivedTime]>=‘YourCondition’”
For current system date-time use DateTime.Now.ToString(“YourDateTimeFormat”)
Thanks & Regards,
Apurba
Abisha
(Abisha gopalan)
October 17, 2019, 2:15am
18
You can use
“[ReceivedTime] >= '”+now.ToString(“MM/dd/yyyy”) +“'” this condition also
please try it