Today(S) function in DASL Filter

M

Mark B

I am trying to figure out how to use the "undocumented" Today(S) function.
Basically I have about 10 search folders that make use of most of these:

%yesterday
%today
%tomorrow
%last7days
%next7days
%lastweek
%thisweek
%nextweek
%lastmonth
%thismonth
%nextmonth

So I am also hoping that these functions also allow for passing of a (S)
seconds parameter.

The reason I am hoping to do this is to pre-adjust my UTC DateTime field
"MileStone1UTC" so that it will be normalized into local date/time.

e.g.

"http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MileStone1UTC"
= Today(46800)

e.g.

"http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/MileStone1UTC"
= Tomorrow(46800)


However it doesn't work. Anyone know what will here?

Here's the article I was referencing:

http://blogs.msdn.com/andrewdelin/archive/2005/08/08/448882.aspx

-Snip -

Outlook SQL DASL syntax - an update
Here's an update to my previous blog entry on Doing more with Outlook filter
and SQL DASL syntax.

I had some great feedback from my previous posting, there is obviously a
need for more information about how to "do stuff" with Outlook filters.

Special thanks to Patrick for a very useful message, which showed me how to
use dynamic dates in Outlook filter queries. Previously I thought this was
impossible! Patrick's trick :)o) is to use the today(S) function with a
parameter in seconds (S). The parameter gives a positive or negative offset
from today and can be used to check the Due Date of tasks (or any other date
test you like).

Here is Patrick's example which he uses on the Tasks folder:

(
("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/811c000b"= 0) AND (NOT("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040" IS NULL)) AND ("http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81050040" <= today(864000)))When applied to a task folder, this shows 'not completed' tasks that have aDue Date set in the next 10 days from today.This same technique should be useful for filtering on received date (etc) onemail folders and others.-Snip end-
 
M

Mark B

Maybe if I knew what Today(0) equated to I could use that if it was an exact
time such as Saturday, January 30, 12:00 AM.

Then I could use:

MileStone1UTC >= Today(0+46800) AND MileStone1UTC <
Today(0+46800+(24*60*60))

where 46800 is 13 hours in my case -- that is the UTC offset from local
time.
 

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