Workflow Example to add Current Date Column

I would like to read in some fields from a Database Table and then add a column with the Current Execution Date. How can you combine these in a workflow so that I Write to a new database table with these combined into the 1 table?

You could create the current date and time and store that in a constant value column. There are further possibilities to use these functions. You have to make sure the Create Date&Time Range node is reset every time you need it (you could connect it with flow variables eg.).

kn_example_date_columns_insert.knwf (25.7 KB)


One more follow-up question. The Create Date and Time Range Node originally comes in as a Date format which would be ideal in writing to another table. It seems we should be able to leave in this format rather than a String. However, when the flow reaches the Constant Value Column Node, it will not allow a select of Date with giving an error. Do you know why? I tryed to use a Type Conversion Node, but no matter what I try to Write, it keeps the current date as a String.

I think the Flow variable does not transfer a Data or Time format only a string. So you would have to insert it as a string and then convert it to Date/Time.

kn_example_date_columns_insert.knwf (49.1 KB)

1 Like