Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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

  • v-yingjl's avatar
    v-yingjl
    5 years ago

    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

  • edhans's avatar
    edhans
    Community 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.

    • Anonymous's avatar
      Anonymous
      Not 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!

  • mahoneypat's avatar
    mahoneypat
    Microsoft 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

     

    • Anonymous's avatar
      Anonymous
      Not 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-yingjl's avatar
        v-yingjl
        Community 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.