I have searched through the forum and asked K AI assistant too, but just want to confirm for sure that KNIME does not support workflow parameters/flow variables of Date type?
For actuarial work we need to have key dates fixed (eg valuation date, date of scheme commencement etc) which are then used throughout the workflow and it helps to have one key area to enter/manage them for each project.
The Variable Creator does not have Date Type in the drop down menu.
I tried to set the date parameters using Table Creator node (by specifying Date Type for the date columns) fed to Table Row to Variable node but the outputted flows variables for date parameters are converted to String Type.
Is there any workaround to have workflow variables as Date Types?
Hi Fabien, thanks but the Date&Time Configuration node also outputs the variable as a String Type (and not Date type as needed).
As a work around to this issue, when I am setting my global variables either (1) through Table Creator –> Table Row to Variable or (2) through Variable Creator, I have created 3 INT types to hold the date’s year, month and date.
Then when I need the “variable” date in an Expression node, I use the make_date function with the above INT variables to have a temporary date within the node.
Though it would really help if KNIME can allow variables of Date and DateTime types.
Hi Andreas, thanks for this trick - this definitely helps me in the data checking/validation part of the project to make sure dates in the data set are within set parameters (variable) dates.
But in the modelling part - where I need the dates as Date Types (eg within the Expression node) it doesn’t help as the functions will not accept String Types for date-based calcs! Eg to calculate all members age as at valuation date (which is a variable being set).