Forum Discussion
Date settings in Power BI
What data type is your input: text or date alteady?
Did you add "en-US" with every data type change to date?
Can you share some relevant parts of your code?
Are you refering to DAX or to Power Query?
- Elsie149 years ago
Advocate I
What data type is your input: text or date alteady?
The original input was of type text. I have converted it to type date.
Did you add "en-US" with every data type change to date?
What do you mean with this? I can't give this parameter when I change the type in the editor.
Can you share some relevant parts of your code?
This is the code where I changed the type of these columns (from text->date/time and from date/time to date):
#"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value",{{"LastLogonDate - Copy", type datetime}, {"CreationDate - Copy", type datetime}}),
#"Changed Type3" = Table.TransformColumnTypes(#"Changed Type2",{{"CreationDate - Copy", type date}, {"LastLogonDate - Copy", type date}}),Are you refering to DAX or to Power Query?
Power Query
- MarcelBeug9 years ago
Community Champion
Well, you can supply the culture code with every type change, but you must know where to find it.
Or you can adjust the generated code by supplying ", <locale>" just before the last ")":
#"Changed Type2" = Table.TransformColumnTypes(#"Replaced Value",{{"LastLogonDate - Copy", type datetime}, {"CreationDate - Copy", type datetime}}, "en-US"), #"Changed Type3" = Table.TransformColumnTypes(#"Changed Type2",{{"CreationDate - Copy", type date}, {"LastLogonDate - Copy", type date}}, "en-US"),- Elsie149 years ago
Advocate I
I'm sorry, my last line of the editor was indeed:
#"Changed Type with Locale" = Table.TransformColumnTypes(#"Renamed Columns2", {{"LastLogonDay", type date}}, "en-US")
Unfortunately, also without results. Still reads it as 1st of November 2017:(