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 261919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:28:20+00:00 2026-05-11T22:28:20+00:00

I have been reading the docs and playing with different EventQuery parameters for days

  • 0

I have been reading the docs and playing with different EventQuery parameters for days now. I am using C# .NET with google’s .net api to get the events from a public calendar I set up. I can get the events from the api just fine but I can’t get it to give me the next upcoming events by date. My calendar has mixed recurrence events with one-shot events. I have read stuff on the internet to use direct query parameter strings in the request uri but doesn’t seem to work right when using it in the .net api structure. Here is what I have currently as my base:

CalendarService myService = new CalendarService("testGoogleCalendar-1");
EventQuery myQuery = new EventQuery();
myQuery.Uri = new Uri(CalendarURI);
myQuery.NumberToRetrieve = NumberOfEvents;
EventFeed calFeed = myService.Query(myQuery);
foreach (AtomEntry entry in calFeed.Entries)
{
    LiteralControl test = new LiteralControl("<p><b>" + entry.Title.Text + "</b></p>");
    this.Controls.Add(test);
}            

I have tried playing with the EventQuery’s members StartDate, StartTime, EndTime, SortOrder, FutureEvents and even tried adding “?orderby=starttime” to the CalendarURI local member.

The api query’s seems to return the order of published date of the event which is when I created the event in the calendar not when the event is going to take place.

I have also been trying to get just the date and time of the event from the AtomEntry object so I can sort it myself and format it with the title in my control but the only place I see it is in AtomEntry’s Content.Content which also has other stuff I don’t really want. Is there a DateTime member to AtomEntry for this so I can just get the date?

This one has really got me confused right now so any help is appreciated.

  • 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-11T22:28:20+00:00Added an answer on May 11, 2026 at 10:28 pm

    I haven’t used the GData calendar API from .NET, but I’m pretty familiar with it in Java. The start time of an event will depend on the type of an event. A recurrent event doesn’t have any start times as such, but a “single” event may actually have multiple times. These are stored as <gd:when> elements – that’s what you need to look for.

    It does look like orderby=starttime really should work though. It may be worth using WireShark or something similar to see the exact query going out and the exact results coming back, to check it’s not something in the API causing problems – in particular, it could be that using that in the Uri property isn’t supported for some reason…

    EDIT: Have you tried setting

    query.ExtraParameters = "orderby=starttime";
    

    ? That’s probably the safest way of getting it into the final query uri…

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

Sidebar

Related Questions

I have been reading about exception handling on the Apple developer docs , but
I have been reading tutorials from several different places like http://css-tricks.com/scrollfollow-sidebar/ or http://jqueryfordesigners.com/fixed-floating-elements/ and
Where can i get a tutorial on making dlls in qt?.I have been reading
I have been reading a number of articles online suggesting different approaches to migrate
I have been reading about using Spring with Hibernate and I am really confused
I have been reading the API and documentation ( http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Analysis.doc.html 9.5 Edge Detection) and
I have been reading around about people using J#. But my question is: What
I have been reading a lot about MVC these days and I think I
I have been reading through the C++ FAQ and was curious about the friend
I have been reading the MSDN documentation on subclassing and I have been successful

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.