How to Change Data Type to Date in Power Query
You are importing data from a CSV file that contains a column 'Date' with values like '2026-01-15'. After loading, Power Query detects the column as type 'text'. What is the recommended step to ensure the column is treated as a date?
Quick Answer
The correct step is to select the column in Power Query and change its data type to 'Date' using the Data Type dropdown in the Transform tab. This works because Power Query’s type detection engine automatically parses standard date strings like '2026-01-15' into a true Date type based on your locale, converting the underlying text into a numeric date serial that enables time intelligence and proper sorting. On the PL-300 exam, this tests your understanding that data type conversion should happen in Power Query Editor—not in DAX or the report view—and a common trap is assuming that simply loading the CSV will auto-detect the type correctly. Remember that Power Query treats imported text literally until you explicitly assign a type, so always check the column icon in the query editor. A quick memory tip: if the column icon shows “ABC,” you must change it to the calendar icon for dates.
⚠ Common exam trap
It's easy for candidates to confuse the 'Format' pane in the report view (which only changes display formatting) with the Power Query data type change (which alters the column's data type in the data model), leading them to select Option B.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
In Power Query, select the column and change the data type to 'Date' using the 'Data Type' dropdown.
In Power Query, the recommended method to convert a text column containing date-formatted strings (like '2026-01-15') to a proper Date type is to select the column and change its data type using the 'Data Type' dropdown in the Transform tab. This ensures the column is treated as a date for downstream calculations and modeling. Power Query automatically parses the text into a date based on the locale and format of the data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
In Power Query, select the column and change the data type to 'Date' using the 'Data Type' dropdown.
Why this is correct
This explicitly sets the data type.
- ✗
In Power BI Desktop, use the 'Format' pane to set the column as a date.
Why it's wrong here
Format pane only changes display format, not the underlying data type.
- ✗
Use the 'Parse' -> 'Date' transformation in Power Query.
Why it's wrong here
Parse is for splitting, not type conversion.
- ✗
Use the 'Detect Data Type' button in Power Query to automatically detect all columns.
Why it's wrong here
This may not work if the data is ambiguous.
Go deeper
Related to this question
About these practice questions
This PL-300 question is part of Courseiva's 217-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on PL-300
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. You are importing data from a CSV file that contains a column 'OrderDate' with values in the format 'YYYY-MM-DD'. Power Query automatically detects the data type as Date. You need to ensure that the data type remains Date even if the source file later changes the date format to 'MM/DD/YYYY'. What should you do?
easy- A.Split the column into year, month, day and then combine
- B.Use the 'Using Locale' transformation
- ✓ C.Set the data type to Date using the 'Change Type' step in Power Query
- D.Change the regional settings of the Power Query editor
Why C: Using the 'Change Type' step in Power Query explicitly sets the data type of the 'OrderDate' column to Date. This step is part of the query's applied steps and will attempt to parse the column values as dates regardless of the source format (e.g., 'YYYY-MM-DD' or 'MM/DD/YYYY'), preserving the Date data type. Option A (splitting the column) is unnecessary and does not enforce the data type. Option B ('Using Locale' transformation) changes how dates are interpreted based on locale but does not guarantee that a changed format will still be parsed correctly if the new format conflicts with the locale. Option D (changing regional settings) only affects the editor's display, not the query's data type enforcement.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.