
John Davies
New Member
Members

Forum Posts: 2
Member Since:
October 27, 2021
October 27, 2021

Hello,
Does anyone know the method to create a new column in Power Query based off of a source file name?
For example, my source file is named 10.24.2021.xlsx. I want Power Query to generate a new column typed as a date that understands all records associated with that file to have 10/24/2021 as their value.
Thank you.

Mynda Treacy
Admin

Forum Posts: 4449
Member Since:
July 16, 2010
July 16, 2010

Hi John,
Welcome to our forum!
Presumably the source file name is in a column. If so, you can simply use Replace to remove the .xlsx and then format the column as Date data type. If Date data type returns an error, then you can use Replace again to replace the . with /.
Mynda

Answers Post
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Jeanine Hagge
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 205
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Othman AL MUTAIRI
Misael Gutierrez Sr.
Attif Ihsan
Kieran Fee
Murat Hasanoglu
Brett Dryland
Saeed Aldousari
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Forum Stats:
Groups: 3
Forums: 24
Topics: 6222
Posts: 27293
Member Stats:
Guest Posters: 49
Members: 31916
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —
