2017-05-25 58 views
1

使用Microsoft Graph的nodejs庫,嘗試查詢我的日曆並返回接下來的5個事件。微軟圖形 - 篩選開始/日期時間

查詢設置:

"code":"BadRequest","message":"The DateTimeOffset text '2017-05-26T00:00:00.000' should be in format 'yyyy-mm-ddThh:mm:ss('.'s+)?(zzzzzz)?' and each field value is within valid range." 

是否2017-05-26T00:00:00不匹配'yyyy-mm-ddThh:mm:ss('.'s+)?(zzzzzz)?'

client 
     .api('/me/events') 
     .header('X-AnchorMailbox', email) 
     .top(5) 
     .filter('Start/DateTime ge 2017-05-26T00:00:00') 
     .select('subject,start,end') 
     .orderby('start/dateTime DESC') 

執行時用圖表回答?

+0

可能相關:[的OData/odata.net#534(https://github.com/OData/odata.net/issues/534) – Oliver

回答

2

簡單的錯誤:

.filter(`Start/DateTime ge '2017-05-26T00:00:00'`)