Forum Discussion

EithneDangan's avatar
EithneDangan
Regular Visitor
5 years ago

Date Errors when loading Files from SharePoint folder into Power Query

Hello everyone.

 

I would love some help.  I am using powerquery to load files from a SharePoint folder.  Any files uploaded since March 17th (St. Patricks Day - Luck of the Irish!) are coming in with Errors for Date Created and Date Modified 

 

Error message: - 

DataFormat.Error: We couldn't parse the input provided as a DateTime value.
Details:
3/24/2021 4:00 PM

 

I have trawled through google searches and forums.  Any Help would be gratefully appreciated

e.g.  See screen shot below:

 

 

6 Replies

  • wynhopkins's avatar
    wynhopkins
    Most Valuable Professional

    This is a bug being investigated by Microsoft

     

    EithneDangan  and I investigated further and changing the SharePoint.Files step to use SharePoint.Contents and drill down to the relevant folder avoided the issue highlighted by HotChilli with US date formatting

    Hope that helps someone else

     

    Cheers

     

    Wyn

  • HotChilli's avatar
    HotChilli
    Community Champion

    It looks like a region settings/date format problem.  The date is being interpreted in the opposite format to the one you want (US or UK). 17 is bigger than 12 which would be a valid month so it throws the error.

    So that's where you should start the investigation.

    • EithneDangan's avatar
      EithneDangan
      Regular Visitor

      Thank you very much your response.  I appreciate every idea.  I had tried that.  All the files in the SharePoint folder are in the exact same date format.  When I navigate to the Sharepoint file directly from within Excel it shows all the files in identical format.  However when I load them file Get Data/From SharePoint Folder the first 3 in the list below load with Date Errors.  

       

       

  • HotChilli's avatar
    HotChilli
    Community Champion

    I don't understand your response.

    Read my answer again.

    Look at what power query did to the first 3 dates. It switched the day and month.  It didn't throw an error because they are still valid dates (even when switched).

    This is quite a common issue (especially when importing dates from a transatlantic source)