Hello,
I have a per second data for each day and I would like to define a condition where any row which falls on a "Friday 12 am to 3pm" should be removed.
Can you please tell how can I achieve this in alteryx?
I have tried a lot of datetime functions and nothing seems to be working.
Thank you
Regards,
Pankhudri
Solved! Go to Solution.
Hi @atcodedog05
The file name looks like this:
"Analytics-Data-2021-05-11-00-00-00.csv"
"Analytics-Data-":this is constant
2021: year
05: month
11: day
post screengrabs of your action tool and the formal tool it's leading into... @atcodedog05 's solution should work for you.
basically formula should be set up as:
"Analytics-Data-"+datetimeformat("2021-05-11 00:00:00","%Y-%m-%d-%H-%M-%S")+".csv"
and action tool should be set up to replace specific string... specific string has to be:
2021-05-11 - date tool put in a date - not a datetime... so the time component of your .csv file name will be static.
Didnt' you already get an answer to your original question btw? You should mark it and start a new thread.
Hello @apathetichell
Thank you for your response.
I marked the solutions for the initial questions. I asked another questions here since it was datetime related.
I will open a new thread.
Regards,
Pankhudri
Hi @Pankhudri20
Here is how you can do it.
Workflow:
1. Using directory to point to the location with all file and get their info.
2. Using formula tool to extract date from filename.
3. Using filter tool to keep only files from 1st June.
4. Read these files using dynamic input tool.
Refer to the initial part of the video to understand more on dynamic input tool https://www.youtube.com/watch?v=ELfKYatOJZM
Hope this helps : )
Hello @atcodedog05 ,
I wanted to ask I change how to do here.
The workflow for dynamic input works fine but I have 2 types of file name.
Analytics-Data 1-11-2021-05-11-00-00-00.csv
Analytics-Data 13-22-2021-05-11-00-00-00.csv
I have 2 different workflows for each type of file.
Can you tell me how to define 1-11- and 13-22- in the regex expression?
It would be really helpful if you can tell me this.
Thank you
Regards,
Pankhudri
@atcodedog05I think the dates follow standard Alteryx date-time so "2021-05-11" is the date... no idea what 1-11 and 13-22 are
Kind of agree @apathetichell may be the case. Just want to be sure🤔
Hi @Pankhudri20,
If the date in new filenames is 2021-05-11. The above same approach should work.
Hope this helps : )
Hello,
Thank you for your response!
The dates are the same as before. Everyday 2 files are generated.
Analytics-Data 1-11-2021-05-11-00-00-00.csv
Analytics-Data 13-22-2021-05-11-00-00-00.csv
Analytics-Data 1-11-2021-06-11-00-00-00.csv
Analytics-Data 13-22-2021-06-11-00-00-00.csv
Analytics-Data 1-11-2021-07-11-00-00-00.csv
Analytics-Data 13-22-2021-07-11-00-00-00.csv
The only thing that changes in the filename is the date.
I want to load 1-11- and 13-22- in 2 separate workflows.
With the above solution it will load all the files and increase loadtime.
So how can I specify 1-11- or 13-22- in the regex formula?
Hope this helps.
Thank you
Regards,
Pankhudri