Format with current date:
format(now(), ’ yyyyMMdd’)
If you want to convert “2 Jun 2021” to “120621”, try to use “right” (to get string “12 Jun 2021”), “pick” (to replace Jun to 06) “replace” to replace “202” part of year with “2”, “removechars” to remove space.
But the issue is the date in the filename keeps changing. There is no specific pattern as the date in the filename depends on the date on which the file is delivered, which varies depending on whenever the data is available.
So I need to extract the date from the filename - create a date using an expression and name the newly created file in the format - filenameddmmyy
Please see the below screenshot:
I use the above table to bring in the correct file - and extracted the date from it using a rule.
Now I need to create a couple of files from this source file - so I derive 5 tables from this table - each having different calculations - so filter on different columns etc to create 5 different files.
These are the files that I am trying to rename using a date calculated based on the date in the original filename.
I don’t know how to get this date and calculate a new expression based on it.
I hope this helps explain a bit more on what I am trying to achieve.
Thank you once again for your help, I really appreciate it.
For the process you are describing, I would recommend iterating using the table? If you already know the filters, it will become easy to pass the date as a parameter for each iteration. From here, you can define a dynamic parameter to utilize the file date for naming.