Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a column of dates and times as shown below. It is currently in text type but when I try changing to date/time, I get an error saying "we can't automatically convert the column to date/time type". The column was created from a Python script by converting a date column in another table to a python list, doing some calculations then putting the list into a dataframe. I'm guessing it's because of the "T" but don't know how to remove it or put a space there instead.
Solved! Go to Solution.
HI @Anonymous ,
The values in your datatime column contain a text character T which doesn't make values in the right format as expected in Power BI.
What you can do is, just replace T with a single space character in this column in Power Query Editor and then try changing it's datatype to datetime. It should work.
HI @Anonymous ,
You will need to remove the last part of your date value as well which is highlghted below:
2021-12-23T12:17:37.780000
You can use EXTRACT before delimiter option in Power Query editor to do this. This can be found under Transform option:
In your case delimiter will be dot operator. Setting should be something like below:
HI @Anonymous ,
The values in your datatime column contain a text character T which doesn't make values in the right format as expected in Power BI.
What you can do is, just replace T with a single space character in this column in Power Query Editor and then try changing it's datatype to datetime. It should work.