Text 05112022 to date in Power Query

SueKi

New Member
Joined
Feb 15, 2022
Messages
44
Office Version
  1. 365
Platform
  1. Windows
I'm pulling in data from a bunch of files. The file title has a 8 digit date included, which I can seperate out with Power Query in the clean up. I can figure out how to convert it to a date in PW, though, can I do it there, or do I have to do it after import? Thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi, chek this example.
Power Query:
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjA1NDQyMDJSitWJVjIGsiGcWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Text.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Date.FromText([Column1], [Format="ddMMyyyy"]))
in
    #"Added Custom"
 

Attachments

  • 1.JPG
    1.JPG
    13.9 KB · Views: 7
Upvote 0
Solution
Hi, chek this example.
Power Query:
let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjA1NDQyMDJSitWJVjIGsiGcWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", Text.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Date.FromText([Column1], [Format="ddMMyyyy"]))
in
    #"Added Custom"
Nice, thank you!
 
Upvote 0

Forum statistics

Threads
1,223,666
Messages
6,173,672
Members
452,527
Latest member
ineedexcelhelptoday

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top