Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Adding a date on a column from file name

IvanMtz88
6 - Meteoroid

Hello Community 

 

Is just that i have 10 files that has the same structure so im adding them by the wildcard (*) because they are in the same folder but evry file has a date at the end of the name lets say that is named like this File_20232803 and it change for every file next file is named File_20232903, File_20233003 and so on so i need to put a column that is call date so i can put the date that the row is coming from let me put it in a table to see if i explain my self better

 

 

FileName                 Column 1            Date

File_20232803          Data                  20232803

File_20232903          Data                  20232903

File_20233003          Data                  20233003

 

I hope i explain my self haha

 

Thank you so much in advance community

 

Have a nice day!

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @IvanMtz88 

 

You can use Replace() function to replace the filename with nothing. It would look something like this Replace([FileName],"File_","")

 

Or you can use Right([FileName],8) function to get 8 characters from the right.

 

You can refer to this page to learn more about string functions https://help.alteryx.com/20223/designer/string-functions 

 

Hope this helps : )

binuacs
20 - Arcturus

@IvanMtz88 Use the output file name as field option in the input tool then extract the date using a formula tool

 

binuacs_0-1680012046049.png

 

IvanMtz88
6 - Meteoroid

Thank you so much Guys with the merge of your answers i was able to do it haha 

 

Have a nice day guys!

Labels