Unknown problem with email filter

Hi All,

I have this email filter in “Get Outlook Mail Messages” :
“@SQL= urn:schemas:httpmail:datereceived > '” +
Now.ToUniversalTime.AddHours(-1).ToString(“dd/MM/yyyy hh:mm:ss”) +
“’ AND urn:schemas:httpmail:subject LIKE ‘%[ABCD]%’”

My desktop is using UTC + 8.00, windows set to “set time zone automatic” on.
This filter is working fine when I run it myself in uipath locally.
Then I deployed it to the orchestrator, with below time setting.
image
It will trigger every hour at UTC + 8.00.
It has no issue on other hour, except every morning 9.00AM, is it due to the ToUniversalTime code? But it will not be working properly if I didn’t put in this.
Anyone can help on this?

Hi

Did we try without that universaltime just like this

Now.AddHours(-1)

Cheers @leewaikit

Hi Palaniyappan,

I did tried that, but it is not working, it couldn’t read any email with just Now.AddHours(-1)

Hi,

“dd/MM/yyyy hh:mm:ss”

It’s not very good because “hh” mean not 00-23 but 01-12. If you use hh, tt (AM or PM) should also be used.
So can you try “dd/MM/yyyy HH:mm:ss”

Or try simply the following filter?

"[Received] >= '" + Now.AddHours(-1).ToString("yyyy/MM/dd HH:mm") +"' AND urn:schemas:httpmail:subject LIKE ‘%[ABCD]%'"

Regards,