Create an All Day Event Using the Google Calendar API

Iam working with C # and Google Calendar API classes "CalendarService" and "Event". I want to upload an event to Google Calendar without any date (all day). If I don't set the Event.End property, I get an exception.

How do I set up an event as an all day event?

I've been looking for a long time, without any solution ...

+1


source to share


2 answers


Add new time s AllDay

to true:



var entry = new EventEntry(title, description, "");
var time = new When();
time.StartTime = start;
time.AllDay = true;

entry.Times.Add(time);

      

+4


source


Unchecked Java answer ???

He asked about C #.



Event newEvent = new Event()
        {

            Summary = "5ummary",
            Location = "location avenue",
            Description = "description",
            Start = new EventDateTime()
            {
                Date = "2015-08-07",

            },
            End = new EventDateTime()
            {
                Date = "2015-08-07",

            },

        };

      

0


source







All Articles