Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: How to get all events for a perticular date, (need exact filter)

Geek News

How to get all events for a perticular date, (need exact filter)
tushar.p.marathe[ at ]gmail.com 4/18/2007 2:22:24 PM
Hi,

In the Outlook Instant search using Folder.GetTable() method, we found
that while filtering the calendar events for a particular date it is
giving all calendar events for that date plus all recurring items even
if not on that date ( i.e. if we have recurring meeting say weekly
meeting on Monday and we are firing query on Tuesday's date to get
calendar events then we are getting all events on that Tuesday's date
plus the recurring meeting on Monday which occurrence is not on
Tuesday's date). These problems are with the Weekly, Monthly and
Yearly calendar items.

So to get exact result which filters we will need to use in the
Folder.GetTable() method??

I am using following filter :
[ at ]SQL=(
(
(
(urn:schemas:calendar:dtstart >= '12:00 AM, 04/18/2007')
&
(urn:schemas:calendar:dtstart < '12:00 AM,04/19/2007')
)
|
(
(urn:schemas:calendar:dtend > '12:00 AM, 04/18/2007')
&
(urn:schemas:calendar:dtend <= '12:00 AM,04/19/2007')
)
)
)


Please help ..

Thanks in advance

Re: How to get all events for a perticular date, (need exact filter)
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 4/19/2007 2:11:53 PM
When you add a filter to a Table object you are dealing with raw MAPI
properties, not Outlook properties that have been massaged to show local
time. You must use UTC times with tables in all cases. So do any of those
dates when compensated for local time still return items that are out of
your filter range?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


<tushar.p.marathe[ at ]gmail.com> wrote in message
news:1176906144.856707.4580[ at ]o5g2000hsb.googlegroups.com...
[Quoted Text]
> Hi,
>
> In the Outlook Instant search using Folder.GetTable() method, we found
> that while filtering the calendar events for a particular date it is
> giving all calendar events for that date plus all recurring items even
> if not on that date ( i.e. if we have recurring meeting say weekly
> meeting on Monday and we are firing query on Tuesday's date to get
> calendar events then we are getting all events on that Tuesday's date
> plus the recurring meeting on Monday which occurrence is not on
> Tuesday's date). These problems are with the Weekly, Monthly and
> Yearly calendar items.
>
> So to get exact result which filters we will need to use in the
> Folder.GetTable() method??
>
> I am using following filter :
> [ at ]SQL=(
> (
> (
> (urn:schemas:calendar:dtstart >= '12:00 AM, 04/18/2007')
> &
> (urn:schemas:calendar:dtstart < '12:00 AM,04/19/2007')
> )
> |
> (
> (urn:schemas:calendar:dtend > '12:00 AM, 04/18/2007')
> &
> (urn:schemas:calendar:dtend <= '12:00 AM,04/19/2007')
> )
> )
> )
>
>
> Please help ..
>
> Thanks in advance
>

Re: How to get all events for a perticular date, (need exact filter)
tushar.p.marathe[ at ]gmail.com 4/19/2007 2:49:58 PM
On Apr 19, 7:11 pm, "Ken Slovak - [MVP - Outlook]"
<kenslo...[ at ]mvps.org> wrote:
[Quoted Text]
> When you add a filter to a Table object you are dealing with raw MAPI
> properties, not Outlook properties that have been massaged to show local
> time. You must use UTC times with tables in all cases. So do any of those
> dates when compensated for local time still return items that are out of
> your filter range?
>
> --
> Ken Slovak
> [MVP - Outlook]http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
>
> <tushar.p.mara...[ at ]gmail.com> wrote in message
>
> news:1176906144.856707.4580[ at ]o5g2000hsb.googlegroups.com...
>
>
>
> > Hi,
>
> > In the Outlook Instant searchusingFolder.GetTable() method, we found
> > that whilefilteringthe calendareventsfor a particular date it is
> > giving all calendareventsfor that date plus all recurring items even
> > if not on that date ( i.e. if we have recurring meeting say weekly
> > meeting on Monday and we are firing query on Tuesday's date to get
> > calendareventsthen we are getting alleventson that Tuesday's date
> > plus the recurring meeting on Monday which occurrence is not on
> > Tuesday's date). These problems are with the Weekly, Monthly and
> > Yearly calendar items.
>
> > So to get exact result which filters we will need to use in the
> >Folder.GetTable() method??
>
> > I amusingfollowing filter :
> > [ at ]SQL=(
> > (
> > (
> > (urn:schemas:calendar:dtstart >= '12:00 AM, 04/18/2007')
> > &
> > (urn:schemas:calendar:dtstart < '12:00 AM,04/19/2007')
> > )
> > |
> > (
> > (urn:schemas:calendar:dtend > '12:00 AM, 04/18/2007')
> > &
> > (urn:schemas:calendar:dtend <= '12:00 AM,04/19/2007')
> > )
> > )
> > )
>
> > Please help ..
>
> > Thanks in advance- Hide quoted text -
>
> - Show quoted text -

Yes i am not using UTC time but still it must have to give me the
exact result of my given filter range.
And only recurrence events those are not scheduled within the filter
range are coming with the events which are scheduled within the filter
range.
You can say that all the recurrences items in my calendar are coming
when i filter out events within a perticular range. :(

Can you try using the above posted filter ?? what is the result you
are getting ??

Re: How to get all events for a perticular date, (need exact filter)
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 4/19/2007 8:02:31 PM
According to the help on filtering items you must use Items.Filter or
Items.Restrict if you want your filter to work with recurring items. Use
Items.IncludeRecurrences before applying the filter or restriction. The help
goes on to say that the Table object returns only 1 row representing the
recurrent appointment item instead of one row foe each occurrence within the
filter parameters.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


<tushar.p.marathe[ at ]gmail.com> wrote in message
news:1176994198.425039.202130[ at ]b58g2000hsg.googlegroups.com...
<snip>
[Quoted Text]
> Yes i am not using UTC time but still it must have to give me the
> exact result of my given filter range.
> And only recurrence events those are not scheduled within the filter
> range are coming with the events which are scheduled within the filter
> range.
> You can say that all the recurrences items in my calendar are coming
> when i filter out events within a perticular range. :(
>
> Can you try using the above posted filter ?? what is the result you
> are getting ??
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net