Extract email by current day and previous day and specific subject

does anyone know how can i write the expression for the filter if i want to filter it by current day and the previous day with a specific subject . Currently i have something like this as my filter by it not fetching email from the current day but only the previous day .

“@SQL=urn:schemas:httpmail:datereceived >= '” +Today.AddDays(-1).ToUniversalTime.ToString(“‘yyyy/MM/dd HH:mm’”)+ “’ AND urn:schemas:httpmail:subject LIKE ‘%VDM%’”

1 Like

Hi @xiangyun.koh

Try this query:

"@SQL=urn:schemas:httpmail:datereceived >= '" + Today.Date.ToUniversalTime().AddDays(-1).ToString("yyyy-MM-dd HH:mm") + "' AND urn:schemas:httpmail:datereceived < '" + Today.Date.ToUniversalTime().ToString("yyyy-MM-dd HH:mm") + "' AND urn:schemas:httpmail:subject LIKE '%VDM%'"

Regards

1 Like

it still fetching the mail from the previous date