Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello there,
short question. I have a date column in a CSV File with that format 01032018 ddmmyyyy
When I change the format from number to date, I just get 30.12.1899 dd.mm.yyyy.
Is there a way to change the Format in M Query or shall I add another column, where I split the number in three parts and put points between them?
#"Geänderter Typ1" = Table.TransformColumnTypes(#"Geänderter Typ",{{"Genehmigungsdat", type date}})
Looking forward for any hints :).
Solved! Go to Solution.
New column:
=Text.Combine({Text.Middle(Text.From([Column1], "en-US"), 2, 1), "/", Text.Start(Text.From([Column1], "en-US"), 1), "/", Text.Middle(Text.From([Column1], "en-US"), 3)})
Afer some time I found a very proper Solution. I just changed the type from text to date in the Advanced Query Editor. And now the date is refered as date without any new column in table or caluclation in Editor.
Sorry for let you waiting so long.
And thanks v-xulgu-msft and Greg_Deckler...just missed that little mistake I made. Thanks a lot.
New column:
=Text.Combine({Text.Middle(Text.From([Column1], "en-US"), 2, 1), "/", Text.Start(Text.From([Column1], "en-US"), 1), "/", Text.Middle(Text.From([Column1], "en-US"), 3)})
Thanks for your suggestion Greg,
I tried to use your example like that:
#"Genehmigungdat" = Text.Combine({Text.Middle(Text.From([Genehmigungsdat], "en-US"), 2, 1), "/", Text.Start(Text.From([Genehmigungsdat], "en-US"), 1), "/", Text.Middle(Text.From([Genehmigungsdat], "en-US"), 3)})
but that didn't work out. Maybe I made the wrong placement. I am not that used to M.
By the way, i noticed that there are different lengths like 10102015 or 1102015 (null is missing).
Can your suggestion handle that aswell?
Hi @Anonymous,
but that didn't work out. Maybe I made the wrong placement. I am not that used to M.
You should change the last step name once you have added new step in Power code.
By the way, i noticed that there are different lengths like 10102015 or 1102015 (null is missing).
Could you provide some examples of date with different length? I have one concern, if the length of dates is not fixed, take 1112015 as an example, should we regard it as 1 November 2015 or 11 January 2015?
Regards,
Yuliana Gu
Afer some time I found a very proper Solution. I just changed the type from text to date in the Advanced Query Editor. And now the date is refered as date without any new column in table or caluclation in Editor.
Sorry for let you waiting so long.
And thanks v-xulgu-msft and Greg_Deckler...just missed that little mistake I made. Thanks a lot.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |