Forum Discussion
Reformatting and change the order of date
- Sep 14, 2023
LarissaM711 as this is a Locale issue, you need to process the date/time as a US type date (that's what it looks like).
Try adding this step in after the initial loading of the data into Power Query:
= Table.TransformColumnTypes(#"Changed Type", {{"Veröffentlichungszeit", type datetime}}, "en-US")
This can be done through the editor by clicking the following:
(using Locale)
Date/Time & English (US)
Hope that helps!
First of all I would suggest importing your csv into Excel via Power Query - opening a csv directly in Excel will try and automatically convert any text dates into actual date fields which can not have a desired outcome.
I think your issue is that 07/14/2023 is being treated as text which is likely due to yur regional settings. If you're operating on a desktop, this needs to be done at the PC level (search regional settings in the start menu). If you're on Excel for web, click File > Options > Regional Format Settings and make sure this matches what you're expecting (Excel for web).
A workaround is to change the csv to a txt which will prevent Excel from automatically trying to parse the dates - you can manually split the file then.
- LarissaM711Sep 14, 2023Copper Contributor
Hey,
i got the csv now and tried to convert the text Date-field with PowerQuery in a Date-field. But here it is the exact same strange thing, that some Rows cannot tbe transformed into a date-field. (Error: The specification for a DateTime value could not be analysed)
I don't know what to do... I attach the CSV here..
- BA_MaxSep 14, 2023Iron Contributor
LarissaM711 as this is a Locale issue, you need to process the date/time as a US type date (that's what it looks like).
Try adding this step in after the initial loading of the data into Power Query:
= Table.TransformColumnTypes(#"Changed Type", {{"Veröffentlichungszeit", type datetime}}, "en-US")
This can be done through the editor by clicking the following:
(using Locale)
Date/Time & English (US)
Hope that helps!
- LarissaM711Sep 14, 2023Copper Contributoromg yeay! Worked!
Thank you so much 🙂