Forum

Changing the data t...
 
Notifications
Clear all

Changing the data type to "Date" only works in two steps

2 Posts
2 Users
0 Reactions
134 Views
(@pbenko)
Posts: 1
New Member
Topic starter
 

Hi,

In my source spreadsheet there is a column that contains the date and time of the transaction in the same field as „2024.05.15 19:35:54”

When imported into the Power Query, if I change the data type "ABC123" to "Date", I get an error.

However, if I change the data type "ABC123" to "Date/Time" first, there is no error and the result is “2024. 05. 15. 19:35:54.” If I change the data type again now to "Date" in another step, it works in this case and the result is “2024. 05. 15.”

I have no idea why it doesn't work in one step, and why it works in two steps. (The only thing I noticed is that after I changed it to "Date/Time" in the first step, Power Query put an extra "." after the date and the second).

 
Posted : 15/06/2024 1:51 pm
(@catalinb)
Posts: 1937
Member Admin
 

Hi Peter,

Before converting to Date, try replacing the "." with "-" or use the Locale date conversion, the "." date separator is not used in US, only few countries are using this separator. The date seems to be in a modified international format yyyy-mm-dd but with dots instead, otherwise use the "/" separator.

 
Posted : 17/06/2024 11:40 pm
Share: