Adding current date to existing table

Hello all
I am new to data analytics, new to KNIME and have very little idea about programming.
That being said, I am trying to automate some excel based reconciliation between accounts and a spending tracker.
For this I’d like to add a column that contains the current date to a column in an Excel sheet to document, when the data was imported. Preferably I want the program to pick the date automatically (e.g. the date of execution of the script), but I could live with a prompt to ask me for input.
So far I have only managed to add a constant value, but need to add this manually before execution. Any way to automate this? Any help is greatly appreciated

@Cal_Steffen welcome to the KNIME forum. You can take a look at this example:

Hi @Cal_Steffen

If you connect a flow variable connection between your workflow and the Create Date Time Range node, then you have every time you run the wf the actual execution date(time). Otherwise you need to reset the Create Date Time Range node manualy after every run.
To feed the exectution date(time) you don’t need the DateTime to String node.
afbeelding

gr. Hans

1 Like

Wow - that are fast responses. Thank you both so much!

2 Likes

Hi Markus

I also started playing with your example, since it would be sweet to have the execution date added to the output file name. But I struggle to understand most of what is happening there.
I’d like to manipulate the path - and not save the files in the KNIME workspace, but in a different folder. Any chance you can point me to the place where I can do that?

@Cal_Steffen you can take look at this example to see how to create path variables

If you want to really understand all the things about paths and files I recommend the lengthy:

https://docs.knime.com/latest/analytics_platform_file_handling_guide/index.html#introduction

Yes it is Long but then you will know everything about this topic.

@Cal_Steffen

For obtaining the current date in KNIME, you can use the ‘Java Snippet’ node and write code like

"LocalDate currentDate = LocalDate.now();
out_cuurentdate =currentDate; "

Refer to the attached image for a visual guide on how to configure the ‘Java Snippet’ node in KNIME.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.