Forum Discussion
osabhaois
5 years agoFrequent Visitor
Date data changing from custom to general in a single column
I have data from US were the dates format change in a column. An example is for a date 10/01/2020 03:50 excel is recognising that it is Custom and the text is right indented then just below that...
Jimmy801
Community Champion
5 years agoHello osabhaois
check out this solution with Table.TransformColumns
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjTQNzDUNzIwMlAwMLYyNVCK1YlWUrDUNzaACBqagAVjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
Transform = Table.TransformColumns
(
Source,
{
{
"Column1",
each DateTime.From(_,"en-US"),
type datetime
}
}
)
in
Transform
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy