Hi can someone help me to see what wrong with my filter expression as i getting the error as shown in the SS. I am trying to filter email received today and received the day before.
“@SQL=urn:schemas:httpmail:datereceived >'” +Today.AddDays(-1).ToString(“‘yyyy/MM/dd HH:mm’”)+ “’ AND urn:schemas:httpmail:subject LIKE ‘%VDM%’” —> this expression allow me to get email received today
“@SQL=urn:schemas:httpmail:datereceived <='” +Today.AddDays(-1).ToString(“‘yyyy/MM/dd HH:mm’”)+ “’ AND urn:schemas:httpmail:subject LIKE ‘%VDM%’”—> this expression allow me to received email from the previous day
I tried combining both but i got error , how should i write if i wan to merged both expression together ? Or how can write the expression if i wan to get email from both today and the previous day.
I think it’s unnecessary to use @SQL=urn:schemas:httpmail:datereceived <='” +Today.AddDays(-1).ToString(“‘yyyy/MM/dd HH:mm’”) part
Doesn’t the following expression work as you expect?
"@SQL=urn:schemas:httpmail:datereceived >'" +Today.AddDays(-1).ToString("yyyy/MM/dd HH:mm")+ "' AND urn:schemas:httpmail:subject LIKE '%VDM%'"
Or it might be necessary to use universal time as the following.
"@SQL=urn:schemas:httpmail:datereceived >'" +Today.ToUniversalTime.AddDays(-1).ToString("yyyy/MM/dd HH:mm")+ "' AND urn:schemas:httpmail:subject LIKE '%VDM%'"