I am new to KNIME and trying to create a flow that both creates a new column, labels it Pay Period, and then adds the last two weeks to the title. I have attached a picture of what I have so far, but I am not sure where to go from here.
The spreadsheet comes in with the current column headers
Completed, I want the column headers to look as follows:
manager, supervisor, PP 6/2/23-6/11/23
Hi you already have the create date time range node which can give you todays date.
Datetime Shift node can shift your days to a different date. You probably need string manipulation node to join the dates together for your desired header.
Table row to variable or sth else can convert your string then into a variable and you could use variable for naming your constant value column
I have created an example workflow that shows how to dynamically create a column name. Let me know if you have any questions about it! The trick is to create the name first, then turn it into a flow variable and use this variable in the configuration of the constant value column node.
Dynamic Column Name.knwf (19.5 KB)
That makes sense. Thank you so much!!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.