birthday DASL-filter

R

rainer.100

I have got a problem with DASL I could not solve anytime.
I want to create a user defined view for my Outlook Contacts. This
view has to show me all friends who have birthday in the next seven
days. So I can send them a letter by using serial letters with MS
Word.
By using the Filter-Generator in Outlook (I am German and I don't know
the englisch words) I can create this string
%next7days("urn:schemas:contacts:bday")%
By using this string Outlook compares only birthdates in the current
year.
What is the syntax in DASL to create a query like this?
next7days(day(bday) & "." & month(bday) & "." & year(now()))
I hope you have the answer or you know a link with it.
Thanks in advance
Rainer
 
E

Eric Legault [MVP - Outlook]

That's a real hum-dinger! I don't think this is possible, primarily because
you'll always be doing a conditional evaluation on a transformed date. And
from what I remember, there are no VBA-like functions available to do this.
If you could use VBA, I think it would equate to this:

DateSerial(Year(Today()),Month("urn:schemas:contacts:bday"),
Day("urn:schemas:contacts:bday")) >= Today() AND
DateSerial(Year(Today()),Month("urn:schemas:contacts:bday"),
Day("urn:schemas:contacts:bday")) <= Today(604800))

The only supported SQL function in DASL that I know of is CAST, but that
doesn't help us extract a date fragment for an evaluation.

Andew Delin has a list of the supported date functions (this is where I got
the Today(604800) offset trick from):

Andrew Delin's WebLog : Doing more with Outlook filter and SQL DASL syntax:
http://blogs.msdn.com/andrewdelin/archive/2005/05/11/416312.aspx
 

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