Outlook messages by subject and date

Hi,

i want to get all messages from the past 7 days and with a specific email subject. I have the below for the subject which works fine but can’t seem to add the date part to it? thanks.

“@SQL=urn:schemas:httpmail:subject LIKE ‘%Your message couldn%’”

@fflattery

Have a look below thread.

Still not working for me. Can’t seem to find a solution

Hi

Try with this expression

In filter property of outlook mail activity

“@SQL=(urn:Schemas:httpmail:subject LIKE ‘%your text%’) AND (urn:Schemas:httpmail:datereceived >= ‘ “ +Datetime.Now.AddDays(-7).ToShortDateString + ” ’)”

Hope this would help you resolve this
ensure you are tying this in your studio and pls don’t copy and paste from here as the direction of the single quotes will change in the expression

Cheers @fflattery

Does this look okay to you?

Doesn’t seem to be working

Yeah it looks fine and i tried from my end
It’s working for me

Pls ensure that it is typed rather not copied pasted from here and if we do so the direction of the single and double quotes changes which will impact this

Cheers @fflattery

Still can’t seem to get this to work. Would it have anything to do with the date format in outlook?
The format i have is in dd/MM/yyyy