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 @Pankhudri20
You can regex like below to capture the filename.
REGEX_Replace([FileName],".*(\d{1,2}-\d{2})-\d{4}-\d{2}-\d{2}.*","$1")
Workflow:
Hope this helps : )
So will it capture both '1-11-' and '13-22-' types of files?
I want to capture only '1-11-' in one workflow and '13-22-' in another workflow.
Regards,
Pankhudri
Hi @Pankhudri20
Yes, use a filter to isolate to a specific type similar to filtering filenames after 1st June.
Hello @atcodedog05 ,
I am sorry for troubling so much!
Since I am new to Regex expressions, I used this expression in the Categorize and it is working perfectly for 1-11 but not retrieving any files when I choose 13-22.
REGEX_Replace([FileName],".*(\d{1,2}-\d{2})-\d{4}-\d{2}-\d{2}.*","$1"
Can you please tell me if any change is required in the expression for 13-22?
I tried changing the expression but it is not taking 13-22.
Any help would be really appreciated.
Thank you
Regards,
Pankhudri Agrawal
assuming 13-22 files have the same structural components as 1-11 - the regex should be the same... is the "-" there and does the date in yyyy-mm-dd follow 13-22? are there any numbers before that 13?
Hello @apathetichell ,
The format is exactly the same as 1-11.
Only 1-11 is replaced by 13-22.
But the expression is not evaluating 13-22. It is taking 3-22.
Regards,
Pankhudri
o.k. - quick fix:
try:
1) swap \d{1,2} for \d+
if that doesn't work try:
2) add a $ right before closing quote so it reads as ".*$"
If neither works let me know and I'll post a more detailed expression.
Hello @apathetichell ,
Thank you soo much!
The 1st options worked well here.
Thanks a lot again!
Regards,
Pankhudri
Hi @Pankhudri20
That's strange it should have worked. Anyways i can see @apathetichell has helped you in the situation 🙂.