How to Filter Email for Get Outlook Emails, where Subject contains current date

Hi! So I was trying to use this syntax for Filter part of Get Outlook Messages

"@SQL=""urn:schemas:httpmail:subject"" like '%business analyst%'"

This works just fine, but I’m hoping to add a variable in the text, instead of business analyst. The variable would be a prefix, then the current date.

for filter by date

Hi @Shinjid

Try this approach

"@SQL=(urn:schemas:httpmail:subject LIKE '%"+SearchString+"%')"

Here, SearchString is a string variable.

SearchString = "DT" + Now.ToString("dd-MM-yyyy")

DT → prefix
Now.ToString(“dd-MM-yyyy”) ->Current date in dd-MM-yyyy format

1 Like

Thanks using "@SQL=(urn:schemas:httpmail:subject LIKE '%"+SearchString+"%')" worked with me.

1 Like

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