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

Ask A Question

Stats

  • Questions 231k
  • Answers 231k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the following function like this: Image('/path/to/original.image', '1/1', '150*', './thumb.jpg');… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer Check you database schema to see if the field (referenced… May 13, 2026 at 2:13 am
  • Editorial Team
    Editorial Team added an answer I figured out the problem - there was a session… May 13, 2026 at 2:13 am

Related Questions

I've been playing with message queues (System V, but POSIX should be ok too)
I have been tasked to write a device driver for an embedded device which
I have some Label controls sitting on Panel controls on a Form. I want
I started with Turbo Pascal 3, went to TP5, Bought TP6 called Borland the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.