Forum Discussion
Split multiple columns in one step
Hello, I have two date and time colums that I am needing to split by delimiter and I want to split all two of these columns into one step instead of having to do it in individual steps. I tried a couple of methods but have been unsuccessful in finding a solution. I am trying to just pull the date only out of the columns because it also includes the time
This is what the columns currently look like
Hi romoguy15 ,
If your columns are already of the type datetime, then you could use this statement:
= Table.TransformColumns(#"Changed Type",{{"Work Order Date Created", DateTime.Date, type date}, {"Work Order Date Completed", DateTime.Date, type date}})In advanced editor it would look like this:
#"Extracted Date" = Table.TransformColumns(#"Changed Type",{{"Start date time", DateTime.Date, type date}, {"End date time", DateTime.Date, type date}}),Let me know if this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- Anonymous4 years ago
if this is not what you are looking for, explain the waiting table in detail with examples
5 Replies
- tackytechtomMost Valuable Professional
Hi romoguy15 ,
If your columns are already of the type datetime, then you could use this statement:
= Table.TransformColumns(#"Changed Type",{{"Work Order Date Created", DateTime.Date, type date}, {"Work Order Date Completed", DateTime.Date, type date}})In advanced editor it would look like this:
#"Extracted Date" = Table.TransformColumns(#"Changed Type",{{"Start date time", DateTime.Date, type date}, {"End date time", DateTime.Date, type date}}),Let me know if this helps!
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- romoguy15Helper IV
Well this method worked alot smoother than I was trying. Thank you
- AnonymousNot applicable
if this is not what you are looking for, explain the waiting table in detail with examples
- AnonymousNot applicable
or
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Zc67DcAgDIThVZBrhMzZkMRdBkBKj9h/jTwc0qT99J90vVOuCQkIq2ELR6NIeXHJbLqGvdGInSCOxQpuiwR1WUzxVUmeJYzZK3FRkzqj7RdlfsmEZ3X9+mWT2KD31zFO", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [wodcr = _t, wodco = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"wodcr", type datetime }, {"wodco", type datetime}}), ttc=Table.TransformColumns(#"Changed Type",{{"wodcr", each DateTime.Date(_), type date},{"wodco", each DateTime.Date(_), type date}}) in ttc - romoguy15Helper IV
This one is also really helpful too and works. For example if I am not trying to split dates but something else, I always wanted to know how to split two columns in one step