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
Power Query inferred text because the CSV values were read as strings. Explicitly setting the column's data type to Date via the Data Type dropdown applies locale-aware conversion, ensuring the values are stored and modelled as dates rather than text.
- ✗
In Power BI Desktop, use the 'Format' pane to set the column as a date.
Why it's wrong here
The Format pane only controls display formatting in the report layer; it cannot change the column's data type in the model, so date hierarchies and time intelligence still fail. It is tempting because it visually renders dates correctly, and would suit cosmetic presentation changes once the type is already correct.
- ✗
Use the 'Parse' -> 'Date' transformation in Power Query.
Why it's wrong here
Power Query has no 'Parse' -> 'Date' transformation; parsing options exist only within specific connectors or the Date/Time split commands. It is tempting because 'Parse' appears in other Microsoft tools such as Excel and SQL, and would be the right mental model when converting delimited text fields there.
- ✗
Use the 'Detect Data Type' button in Power Query to automatically detect all columns.
Why it's wrong here
'Detect Data Type' applies locale-based inference across all columns and may re-detect 'Date' as text again, leaving the problem unresolved. It is tempting because it automates typing during import, and would be correct when loading a clean source where every column's type is unambiguous.
Go deeper
Related to this question
About these practice questions
This PL-300 question is part of Courseiva's 524-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: The correct option is C: set the data type to Date using the 'Change Type' step in Power Query. This explicitly fixes the column's type as Date in the query's applied steps, so Power Query parses the incoming values according to the defined type rather than relying on automatic detection, which can vary with source format changes. Using 'Using Locale' (B) is only needed when the source text format is ambiguous or locale-specific, and it does not by itself guarantee a stable Date type. Splitting into year/month/day (A) is unnecessary and would not produce a Date type directly, and changing the Power Query editor's regional settings (D) affects locale interpretation globally rather than pinning the column's data type.
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.