logo
search
Power Query Problems

Fix DataFormat.Error When Power Query Cannot Parse a Date in Excel

Chanuka GeekiyanageChanuka Geekiyanage Oct 10, 2026 868 views

Question details

The user encounters a DataFormat.Error in Power Query because dates imported from a CSV file fail to parse due to mismatched regional formats.

How to Fix DataFormat.Error When Power Query Cannot Parse a Date
Product
Excel
Device & OS
not provided
Scenario
Importing data from a CSV file into Power Query where the date formatting varies from the system's default regional settings.
Observed behavior
Power Query displays a DataFormat.Error and fails to convert the imported text string into a valid date column.
Before you start

Open the original CSV file in a standard text editor like Notepad to verify the exact format of the dates (e.g., DD/MM/YYYY vs. MM/DD/YYYY) before attempting to change the locale in Power Query.

Solution 1Recommended

Change Data Type Using Locale in Power Query

Use the 'Using Locale' feature to force Power Query to interpret the date string according to the specific region's format.

Power Query relies on your system's regional settings to interpret dates by default. When you import a CSV generated in a different region, the date sequence (like Day/Month vs. Month/Day) conflicts with your settings, resulting in a parsing error. Specifying the locale at the column level resolves this.

1
Open Power Query Editor

Load your CSV data into Excel. If you see the DataFormat.Error, click on 'Transform Data' to open the Power Query Editor.

2
Select the Affected Column

Locate the column that contains the date errors. Right-click on the column header to open the context menu.

3
Navigate to Change Type Using Locale

In the right-click menu, hover over 'Change Type' and select 'Using Locale...' at the bottom of the list.

4
Configure Date and Locale Settings

In the dialog box, set the Data Type to 'Date'. Then, click the Locale dropdown and choose the region that exactly matches the format of your source data (for example, select 'English (United Kingdom)' if your dates are formatted as DD/MM/YYYY). Click OK.

Change Data Type Using Locale in Power Query
Format Matched: The column should now display dates correctly without errors. You can safely click 'Close & Load' to bring the clean data back into your spreadsheet.
Free Microsoft Office alternative

Handle Your CSV Data Effortlessly with WPS Office

If you are struggling with complex Excel add-ins and Power Query errors, try WPS Office. It provides a lightweight, highly compatible spreadsheet tool that makes importing and formatting CSV data straightforward and error-free.

  1. 1. Open WPS Spreadsheet: Launch WPS Spreadsheet and navigate to the Data tab on the top ribbon.
  2. 2. Import Your CSV File: Click on 'Import Data' and select your CSV file from your local drive.
  3. 3. Format Dates in the Import Wizard: Use the Text Import Wizard to specify your delimiter. In the final step, select the date column, choose 'Date', and set the correct sequence (e.g., DMY) to import without errors.
Fully compatible with Microsoft Excel (.xlsx, .csv, .xls) files and formats.Intuitive Text Import Wizard that easily handles complex date and regional formats.Lightweight installation with fast loading times for large datasets.Free to use with a familiar, user-friendly interface that requires no learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Power Query show a DataFormat.Error for dates?

This error occurs when the date format in your source data (like a CSV file) does not match the regional settings or default locale of your Power Query environment, making it unable to parse the text into a valid date.

Can I change the default locale for the entire Power Query workbook?

Yes, you can change the workbook's default locale by going to File > Options and settings > Query Options > Current Workbook > Regional Settings, and selecting the desired default locale.

What if the CSV has multiple date formats in the same column?

If a single column contains mixed date formats, you may need to split the column by delimiter, extract the day, month, and year components manually, and then reconstruct a standardized date column using a custom column formula.

Will changing the locale affect other columns?

No. Using the 'Change Type > Using Locale' option on a specific column only applies the parsing rule to that selected column. Your other columns and overall workbook settings remain unaffected.