I am outputting a file using the render tool. I have the file exporting to Excel with 7 different sheets. I need to know how can I add the date to the file name. I know how to do it using a normal output tool but not sure how it works with the render tool. Can anyone assist?
Thanks!
Solved! Go to Solution.
Hi @BrandonS4, I have attached a sample solution, is this what you are looking to achieve? The workflow
create a date field in the formula tool, which gets prependend to the output file name in the Render tool.
Do you have to use the union tool because of the render tool? You don't have to do this when doing a normal output, correct?
Hi @BrandonS4, you don't have to use a union tool to append date to your file name. Just include a formula tool before Render, and reference it within the render tool. Something like the below:
The configuration in the Render tool would look something like this:
The solutions provided were meant to illustrate the art of possible.
I used the Union tool to bring multiple data streams together to create multiple sheets.
Thank you both for helping me with this! I can now use this for other workflows I have.
One other question....If the date is added to the end of my filename, how do I convert the date to the correct format? It currently is "Filename" + %Y_%m_%d and I would like for it to be "Filename" + %m_%d_%y.
If your date value in your data is in a String datatype, then you use a combination of DateTimeParse and DateTimeFormat to get in the format you need. This basically converts the original string into date, and back into a string format of your choice. The formula would look something like:
"Filename_"+
DateTimeFormat(
DateTimeParse([DT],'%Y_%m_%d')
,'%m_%d_%y')
If the date value is already in a Date datatype, then the following should do the trick
DateTimeFormat([DT],'%m_%d_%y')