Forum Discussion
Syndicate_Admin
Administrator
1 year agoTransform from text to date
Hello everyone I'm working on transforming some data that comes from a file obtained through Google Sheets. The problem I'm facing is that the date field appears as text and doesn't allow me to conv...
lbendlin
Super User
1 year agolet
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCilNVTAwVghOLdBRMDKwMjW1MjZWcPcNAXKMTJRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
#"Added Custom" = Table.AddColumn(Source, "Custom", each DateTimeZone.FromText(Text.Replace([Column1],"GMT ","+00 "),[Format="ddd dd MMM, HH:mm:ss zz yyyy"]),type datetimezone)
in
#"Added Custom"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.