Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
how do i seperate the date and time from the column ?
I try to delimiter them and i can change the data type of date to date but not the time.
Solved! Go to Solution.
Hi @Anonymous ,
You can try using the Column From Examples in Query Editor. Enter the relevant data in the format you want, and Column From Examples will automatically match the format you want.
Here is a demo, refer to the APPLIED STEPS:
Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
You can try the below.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjLQN7DUNzIwtFQwtTK2sDIwUUjUy9WLyVOKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [DateTime = _t]),
#"Split Column by Delimiter" = Table.SplitColumn(Source, "DateTime", Splitter.SplitTextByEachDelimiter({" "}, QuoteStyle.Csv, false), {"Date", "Time"}),
#"Replaced Value" = Table.ReplaceValue(#"Split Column by Delimiter",".","",Replacer.ReplaceText,{"Time"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Date", type date}, {"Time", type time}})
in
#"Changed Type"
Basically, all I've done is added an extra step Replace Values "." with "", this will allow you to format time correctly.
Hi,
Thanks for helping.
I am relatively new in Power BI.
i paste the entire code into ''Advance editor in power query' and then this happened.
it did what it suppose to do split date and time but only 1 line remaining in the table
Hi @Anonymous ,
You can try using the Column From Examples in Query Editor. Enter the relevant data in the format you want, and Column From Examples will automatically match the format you want.
Here is a demo, refer to the APPLIED STEPS:
Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
77 | |
74 | |
42 | |
32 | |
28 |
User | Count |
---|---|
100 | |
93 | |
52 | |
50 | |
48 |