Today(S) function in DASL Filter

Status
Not open for further replies.
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-
 
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.

"Mark B" <none123@none.com> wrote in message

news:echK4MWoKHA.5524@TK2MSFTNGP05.phx.gbl...
> 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-
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
M Today(S) function in DASL Filter Outlook VBA and Custom Forms 1
I Today function in Outlook Forms Outlook VBA and Custom Forms 1
R unable to filter tasks when start date is on or before today Using Outlook 3
S Outlook 2016 Arrange tasks by date, additional custom sorting, but still use friendly terms like Today, Tomorrow, This week? Using Outlook 1
S Changing colors of today's appointments, but not recurring ones Using Outlook 33
M In Outlook Calendar remove the buttons: 'Today' and '<' (Back a day) and '>' (Forward a day) that are below the Ribbon and above the calendar display. Using Outlook 0
D Add date next to day name in Outlook Today calendar view Using Outlook 1
K Accentuating today in Outlook calendar month view Using Outlook 2
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
S stop calendar date reverting to today Using Outlook 7
Diane Poremsky Make 'today' stand out more in the calendar Using Outlook 0
T OL 2010 "Outlook Today" Entries Disappear Using Outlook 0
A Show ALL of today's appointments in To-Do Bar Using Outlook 1
F Outlook 2007 Calendar Appointments not in Outlook Today view Using Outlook 11
S Custom view in todo bar with "Today," "tomorrow" groupings Using Outlook 2
A OUTLOOK TODAY SCREEN Using Outlook 1
smokiibear Custom Today Page Using Outlook 1
T Events Not Showing In Outlook Today Using Outlook 3
W Midnight bug - Outlook Today & reminders Using Outlook 5
M Filter today's mail Using Outlook 2
smokiibear How to modify Today Page to Include tasks from other task folders Using Outlook 1
S 2010 outlook today looks like an empty email box Using Outlook 4
M Outlook Today. How to rename IMAP inbox accounts to something else than inbox? Using Outlook 4
V Advanced Find - [Today]-3 ? Using Outlook 4
G Customize Outlook Today folder Using Outlook 0
M How can I get new styles for Outlook Today 2003? Using Outlook 1
E Calendar View - Go to Today (Alt+O keystroke gone in 2010) Using Outlook 2
B 2003 >> 2010 outlook today security changes (Iframes? Href?) Using Outlook 1
B link to group schedules from Today screen Using Outlook 2
R Getting my Claendar additions to appear in Outlook Today Using Outlook 7
C Missing "Customise Outlook Today" button Using Outlook 4
H Outlook 2007 - hide completed tasks from Outlook Today -Solution Using Outlook 2
S Outlook 2007 caendar hangs when I select today's day BCM (Business Contact Manager) 4
M How do I get Outlook Today to show appts from multiple calendars? Using Outlook 5
N VBA code to show today's date + a sequencial number in subject lin Outlook VBA and Custom Forms 1
D Get a list of today's events from Outlook Outlook VBA and Custom Forms 2
Witzker Outlook 2019 HELP to get Template Path in a Function Outlook VBA and Custom Forms 2
L Outlook saved template function too limited Using Outlook 2
R Creating a user defined function Outlook VBA and Custom Forms 3
J Copy to calendar function no longer working in outlook 365 Using Outlook 5
J autocomplete function in custom form Using Outlook 1
A How to assign the value returned by the regex execute function to a variable? Using Outlook 1
B Search function in Office 365 has stopped working Using Outlook 3
T Query About "Delay Delivery" Function Using Outlook 5
M Constant indexing/no search function Using Outlook 0
B Search function "to: ONLY Bob" Using Outlook 1
K Outlook 2007 Calendar - Time spinner does not function correctly Using Outlook 1
B The “run a script” function stopped unexpectedly in Outlook2007 Using Outlook 6
R searching a not function Using Outlook 2
E Outlook 2007 backup and restore function Using Outlook 2

Similar threads

Back
Top