Calling all Racers for the Alteryx Grand Prix! It's time to rev your engines and race to the stage at Inspire! Sign up here.

Alteryx Designer Discussions

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

Add a column that has date of file creation on each row of data

NikSTHF
7 - Meteor

Hi,

 

Can't seem to crack this. Source data isn't changeable unfortunately so I've got to add a column to the data that says what the date of file creation was, and this needs to be on each row.

 

DatePerson NameData 1Data 2
11-07-17Person 1xxxxxx
11-07-17Person 2xxxxxx
11-07-17Person 3xxxxxx
11-07-17Person 4xxxxxx

 

So that date would change depending on when the file was created. These files are expected to either be produced by a person on our end, or transferred by FTP at 0300 so the date shouldn't matter too much. 

 

How on Earth do I do this?

 

 

6 REPLIES 6
MarqueeCrew
20 - Arcturus
20 - Arcturus

How about creating a [DATE] field with a DATE data type?

 

The formula would be:

 

DateTimeToday()

The output would look like:

 

2017-07-11

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
NikSTHF
7 - Meteor

You know it's been a long day staring at screens when the answer is that simple.

 

Thanks Mark.

 

 

gnans19
11 - Bolide

Step1: Use "Directory tool" to get all the files' metadata, this will give you "file creation date"

Step 2: In your "Input Data" tool, configure output file name as field

Step 3: Join Input data out put and Directory tool output based on file name.. boom you'll get file create date as a field.

 

This will work even if the file is created on a different date.

slarosa_az
6 - Meteoroid

 Hey gnans19 - could you provide an example? I am trying to bring in 4 files using the dynamic input and would like to add creation date column for each file imported

BLambert
5 - Atom

Hello,
do you have an example of this? I am trying what you said but the join isn't working. the only difference I see in the file name is that the Directory Input has .csv at the end of the file name, and the Input Data file name does not. they are both V_WString's as well.

yogikrishna
5 - Atom

Hi,

 

Can we get an example for this.

 

i am bringing data from Various folders and sub folders using a directory tool for specific file name.. i need the Full path and creation date along with it so that i can identify from which location each line item was populated.

 

thanks

Yogi

Labels