Hi!
I’m new to KNIME and looking for a standard way of defining a new date column. I have a table with two date columns, and would like to create a new one (third) based on this logic:
NEW_DATE = min(DATE_COL_1, DATE_COL_2, <TODAY’S DATE>)
Can I use any standard nodes to achieve this, or do I need to write Java code?
Thanks!
With the new 3.6 release there is a new node you should give a try: The Column Expressions node comes with the Expressions extensions. Just pass your table with the two dates to the Column Expressions node and inject the current date as flow variable from a Date&Time Input node. With this being done, you can easily implement the logic your logic.
As @Marten_Pfannenschmidt suggested the new Column Expressions node, I thought I would pull together a quick workflow for this example, since I hadn’t had a chance to use it yet myself. I hope it helps!
DateTimeColumnExpressions.knwf (12.4 KB)
Hi @ScottF
I can’t find this Node after upgrade in Node Repository nor in NodePit. Where is it?
Br,
Ivan
Hi,
you have to install the KNIME Expressions extension and then it can be found under KNIME Labs.
Cheers,
Moritz
Got it! Thank you!
Ivan
Thanks for the help. It solved my problem!
BR,
Johan