Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4056292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:48:31+00:00 2026-05-20T14:48:31+00:00

I am trying to retrieve South African public holidays using Google’s .NET Calendar API

  • 0

I am trying to retrieve South African public holidays using Google’s .NET Calendar API.

I have the following issues:

  1. Some of the retrieved data is outside of the specified EventQuery range. (Both before and after the given date range)
  2. Some of the calendar entries are missing. One of them being Christmas 2011-12-25

I verified that this particular public calendar has the correct dates by viewing it online.

My best guess is that I am using the API incorrectly and that I am querying something like the calendar entry’s created/updated date instead of the event date.

Code:

var feedUrl = "http://www.google.com/calendar/feeds/en.sa%23holiday%40group.v.calendar.google.com/public/full";
var service = new CalendarService("My application name");

var qry       = new EventQuery(feedUrl);
qry.StartDate = new DateTime(2011, 1, 1);
qry.EndDate   = new DateTime(2012, 1, 1);

EventFeed results = service.Query(qry);

foreach (EventEntry entry in results.Entries)
{
    if (entry.Times.Count == 0)  
       continue;

    // Using entry.Times[0].StartTime results in 
    // missing data and data outside of the given search criteria.
}

I am using the latest available Google .NET Data API 1.7.0.1

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T14:48:31+00:00Added an answer on May 20, 2026 at 2:48 pm

    Found the issue:

    qry.StartDate = new DateTime(2011, 1, 1);
    qry.EndDate   = new DateTime(2012, 1, 1);
    

    should be:

    qry.StartTime = new DateTime(2011, 1, 1);
    qry.EndTime   = new DateTime(2012, 1, 1);
    

    This solves both of my issues mentioned in my question. (Not sure why the EventQuery class has both Date/Time properties, this is confusing when only the one set works).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to retrieve some data using a reader in vb.net. I dont have
I'm trying to retrieve values using VB.NET from a SQL database. How do I
I am trying to retrieve some data from an API using CURL request. Is
I am trying retrieve user name from the code through graph api, the below
I'm trying to retrieve this page using Apache HttpClient: http://quick-dish.tablespoon.com/ Unfortunately, when I try
Hi I am trying to retrieve values from database. I have a row which
I am trying to retrieve RSS feed using php. The xml has many different
I'm trying to retrieve product information from magento by calling its web service using
trying to retrieve the id column of records that have their checkboxes selected in
I'm trying to retrieve my contacts using curl. I've succeeded in getting my authToken,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.