Power QueryExercises

DataFormat.Error: We couldn't parse the input provided as a Date value

By Tahir Nas · Examples run in our simulator · Updated

DataFormat.Error: We couldn't parse the input provided as a Date value.

Text was converted to a date using a culture that reads it differently. 31/12/2026 is valid day-first (en-GB) but not month-first (en-US), where there is no month 31.

Common causes

How to fix it

  1. Pass the source culture: Table.TransformColumnTypes(…, {{"Date", type date}}, "en-GB") or Date.FromText(x, [Culture = "en-GB"]).
  2. For known layouts, give the format: Date.FromText(x, [Format = "dd/MM/yyyy"]).
  3. For mixed columns, try one format and fall back to another with try … otherwise.

Find the step that fails

Minimal example

Raises the error:

Date.FromText("31/12/2026", [Culture = "en-US"])

Fixed:

Date.FromText("31/12/2026", [Culture = "en-GB"])

Both snippets are run by the Power Query Exercises simulator on every build: the first must raise DataFormat.Error, the second must run.

Practise avoiding it

Guides

Related lessons

Similar errors