Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Getting seconds from SharePoint list date/time column

I'm using Power Query in Power BI Deskop RS to read a SharePoint list. In that list there are several date/time fields, for example "Started". The Started field contains a date and a time. By defaul...
  • lbendlin's avatar
    2 years ago

    It's a known "feature"  of the v2 connector.  If you don't like that, you can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues . If you have a Pro license you can consider raising a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi

     

    If you are adventurous you can also use the SharePoint REST API to fetch the list items. That includes the UTC timestamp down to the seconds

     

     

    let
        Source = Json.Document(Web.Contents("https://<site url>/_api/web/lists/GetByTitle('Microsoft tickets')/items", [Headers=[Accept="application/json;odata=verbose"]])),
        d = Source[d],
        results = d[results],
        #"Converted to Table" = Table.FromList(results, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
        #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"Title", "Submitted", "SubmittedbyStringId", "Resolved", "Modified"}, {"Title", "Submitted", "SubmittedbyStringId", "Resolved", "Modified"})
    in
        #"Expanded Column1"