Microsoft Graph: Unable to update Start or End Date of an event

前端 未结 2 1826
既然无缘
既然无缘 2020-12-22 01:55

I\'m using Microsoft Graph .NET SDK to update outlook events. Following code successfully updates the Subject, and Body attributes of an event. But

相关标签:
2条回答
  • 2020-12-22 02:49

    You need to add date in below format. Hope it will solve your issue.

    var @event = new Event
        {
            Subject = "Test subject",
            Body = new ItemBody { Content = "Test body content" },
            Start = new DateTimeTimeZone {  DateTime = "2020-08-20T08:30:00.0000000", TimeZone = "GMT Standard Time" } 
        };
    
    0 讨论(0)
  • 2020-12-22 02:51

    You need something like this instead because of the object type being used in the property

                var @event = new Event
            {
                Subject = "Test subject",
                Body = new ItemBody { Content = "Test body content" },
                Start = new DateTimeTimeZone {  DateTime = "2020-08-20T08:30:00.0000000", TimeZone = "UTC" } 
            };
    
    0 讨论(0)
提交回复
热议问题