![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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? |
Ads |
#2
|
|||
|
|||
![]()
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. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "David" wrote: 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? |
#3
|
|||
|
|||
![]()
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. "Sue Mosher [MVP-Outlook]" wrote: 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. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "David" wrote: 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? |
#4
|
|||
|
|||
![]()
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. |
#5
|
|||
|
|||
![]()
David:
I, too, have spent significant time searching the web and experimenting to find an answer to this very question. All answers I found are vague, don't work, or simply say you can't do it. Happily, I stumbled onto a solution that is amazingly simple. I found it in a excerpt from the book "Sams Teach Yourself Microsoft Office Outlook 2003 in 24 Hours" by Diane Poremsky (Reference: See Figure 3.13 http://www.informit.com/store/produc...sbn=0672325543 ). I am using Outlook 2007 so I'm guessing it works for Outlook 2010 as well. Here's what you do. The ***'ed step is the 'secret' step: 1. Create a Custom View 2. Edit that view and click the "Filter..." button 3. Click the "Advanced" tab 4. Click the "Field" drop-down button and select "Received" 5. Click the "Condition" drop-down and select "on or after" ***6. Click in the "Value" field and type "30 days ago" ('30' can be any integer) 7. Click "Add to List", "OK", "OK" You will notice that this solution does not use SQL. I checked the SQL tab after following these steps and found that the correct date is magically hard coded into the expression. Thus, this still doesn't answer how to write a general SQL statement. However, it does the job. Hope this helps! P.S. This is my first post. Any feedback would be appreciated. --- Quote:
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filter on last modified - X days | bsharp | Outlook - Using Contacts | 0 | December 4th 07 03:49 PM |
how to retain 10 days items in Outlook 2003 deleted items folder? | Balthazar | Outlook - Installation | 2 | June 7th 06 05:05 PM |
Auto Empty Deleted Items on Exit OR after X days or X Items accumulated? | JDJ | Outlook - General Queries | 2 | May 30th 06 11:48 PM |
can I view all calendar items ticked private on a filter? | minidriverpip | Outlook - Calandaring | 2 | April 19th 06 11:39 PM |
"There are no items to show in this view" in Taskpad. No filter. Cant reset Current view | [email protected] | Outlook - Calandaring | 0 | February 3rd 06 07:36 PM |