March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
i have a column of dates in the excel in this format:
01/1/2016:01:38:19
So in powerbi, i spilt the column into date and time but encounter error when i tried changing the data type for date column.
"[DataFormat.Error] We couldn't parse the input provided as a Date value."
I tried to reformat to date in excel before importing to powerbi but same error occured.
Anyone can advice?
Thank you.
Solved! Go to Solution.
Hi @Anonymous ,
Please split the date column like this in power query.
For more details, please check the M code as below.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjDUN9Q3MjA0szIwtDK2sDK0VIqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"date", type text}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "date", Splitter.SplitTextByEachDelimiter({":"}, QuoteStyle.Csv, false), {"date.1", "date.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"date.1", type date}, {"date.2", type time}})
in
#"Changed Type1"
Hi @Anonymous ,
Please split the date column like this in power query.
For more details, please check the M code as below.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjDUN9Q3MjA0szIwtDK2sDK0VIqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"date", type text}}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type", "date", Splitter.SplitTextByEachDelimiter({":"}, QuoteStyle.Csv, false), {"date.1", "date.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"date.1", type date}, {"date.2", type time}})
in
#"Changed Type1"
Hi
I will try to use Power Query to split the column into two columns using the split function to fix this issue
Tomas
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
88 | |
73 | |
67 | |
49 |
User | Count |
---|---|
199 | |
141 | |
97 | |
79 | |
68 |