Question
You have a CSV file that contains user complaints. The file contains a column named Logged. Logged contains the date and time each complaint occurred. The data in Logged is in the following format: 2018-12-31 at 08:59.
You need to be able to analyze the complaints by the logged date and use a built-in date hierarchy.
What should you do?
- A. Apply a transformation to extract the last 11 characters of the Logged column and set the data type of the new column to Date.
- B. Change the data type of the Logged column to Date.
- C. Split the Logged column by using at as the delimiter. Correct
- D. Apply a transformation to extract the first 11 characters of the Logged column.
Explanation
Splitting Logged on the "at" delimiter separates the date part from the time part, and Power Query detects the new date column as a Date type, which gives you the built-in date hierarchy. Changing the whole column to Date fails because the literal text "at" cannot be parsed. Extracting the first 11 characters leaves a text column with no Date type, and the last 11 characters contain the time, not the date.