Forum Discussion
Sharepoint list : Odata vs Connector
I read couple of articles saying the two methods look like the same (odata versus sharepoint connector).
I have one concerned and would love hearing your advices on this :
- I created a dashboard with sharepoint list (fill by a power app)
- I used the connector and for one of my data field (date), I see March 17th
- I tried the odata connection and the result for the same row is March 18th
The real data is March 18th (checked it in the sharepoint list and in the power app).
I don't really understand why I have such a gap between the two information. Any of you already experienced such an issue?
Thanks
Hi Anonymous ,
As @ mahoneypat mentioned, SharePoint stores datetime field values in UTC format. When you get datetime from SharePoint, you can use DateTimeZone.ToLocal() function in power query to transform the datetime to your local time to compare it with the OData datatime to check.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- edhansCommunity Champion
Is that was is loading to the data model? Sometimes Power Query will show cached data in the display, but the actual data will load properly as the cache isn't used during the load.
- AnonymousNot applicable
Thank you Edhans, I don't think it comes from the cache because I checked all the possible scenario before, after loading and always same result: gap in date!
- mahoneypatMicrosoft Employee
I don't know if this is the case, but one thing to check is if one is returning UTC time (how SharePoint stored datetime info) and the other is returning local time.
Pat
- AnonymousNot applicable
Hi Pat,
This is something I thought about but I have to say I don't know where to check such parameter on sharepoint list. In the field setting I don't see this information but maybe it is somewhere else...?
- v-yingjlCommunity Support
Hi Anonymous ,
As @ mahoneypat mentioned, SharePoint stores datetime field values in UTC format. When you get datetime from SharePoint, you can use DateTimeZone.ToLocal() function in power query to transform the datetime to your local time to compare it with the OData datatime to check.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.