View filter on mail items sent in the last 30 days

D

David

While trying to create what I thought was a simple view filter to show mail
items sent in the last 30 days I've learned that Outlook doesn't accomodate
this via simple configuration. I tried doing an Advanced filter but I'm
still constrained by the same limitations (e.g. last 7 days, last month...).
I'm no wiz with SQL but it seems this is the only place where I can
accomplish what I'm after. I tried the expression below but it didn't pass
the SQL parsing:

"urn:schemas:httpmail:date" >= today() - 30

How can I apply a filter that will show me all email sent in the past 30 days?
 
S

Sue Mosher [MVP-Outlook]

As you've already determined, you can't. The DASL syntax for view filters
doesn't support expression like today() - 30. The best you can do is filter
for items after a specific date and change that literal date value in the
filter every day.
 
D

David

Disappointing but it is what it is I guess. Any idea why the functionality
is so limited? When I hear SQL I think robust query language. It doesn't
seem very robust if it can't filter on a variable number of days, and
updating a specific date filter is less than ideal as I'm working for Outlook
in order to get it to work for me.

With a Sent Items folder that grows every day it would be nice to be less
taxing on the Exchange server and return only a current subset of mail items
instead of the entire folder which is currently in excess of 11k. Yikes!

Thanks for you help.
 
S

simon

Dear David,
you may try this way:
"urn:schemas:httpmail:date" & " >= '" & Date.Today.Subtract(New TimeSpan(30,
0, 0, 0)) & "'"

it works on my app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top