Hi Chris,

The StartDate and EndDate parameters actually set the 'updated-min' and
'updated-max' query parameters in the request.  This retrieves events
which have been updated/added in that period.  Alternatively, the
StartTime and EndTime parameters set the start-min and start-max query
parameters which are used to filter when an event takes place.

Frank's post has a bit more information:
http://groups-beta.google.com/group/google-calendar-help-dataapi/msg/5821d0596147926e

Hope this helps!

Cheers,

-Ryan



On Jan 2, 6:16 am, "Chris" <[EMAIL PROTECTED]> wrote:
 Hi,

I was just wondering how, using the Google Calendar DLL, I would be
able to use a Calendar Query object to retrieve all events prior to two
weeks from to until two months in the future, e.g:

Imports Google.GData.Calendar
Imports Google.GData.Client
...
Dim gQuery As New Google.GData.Calendar.EventQuery
Dim gService As New Google.GData.Calendar.CalendarService
...
gQuery.StartDate = Date.Now.AddDays(-14)
gQuery.EndDate = Date.Now.AddMonths(2)
...
Dim calFeed As Google.GData.Calendar.EventFeed
Try
   calFeed = gService.Query(gQuery)

        If calFeed.TotalResults = 0 Then
            MsgBox("No results :-(")
            myEvent = Nothing
            gQuery = Nothing
            gService = Nothing
            Exit Sub
        End If

        For s = 1 To calFeed.TotalResults
...

My problem is that whenever I execute the code above, the
"TotalResults" is always 0 - it doesn't appear to be retrieving any
information from my calendar.

However when I use the following lines to set the date, it works:
        gQuery.StartTime = Date.Now.AddDays(1)
        gQuery.EndTime = Date.Now.AddMonths(2)

I cannot set StartTime to Date.Now.AddSeconds(1) or for that matter any
other value less then Date.Now.AddDays(1) - which means I cannot
retrieve past events. This query object also seems to disregard the
'StartDate' and 'EndDate' properties...

Any ideas? Can anybody shed a bit of light on this unintuitive mystery?

Thanks,

Chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google 
Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to