Hi,
while preparing a test workflow I noticed the Date Modifier node seems to not recognize date columns.
Best
Mike
Hi,
while preparing a test workflow I noticed the Date Modifier node seems to not recognize date columns.
Best
Mike
Hi @nan,
it is less about what I tried to accomplish but more about the realization that the Date Modifier node does not recognize any of the present Date/time columns.
Best
Mike
It’s interesting that the “Date Modifier” node does accept Date&Time columns only:
It actually the same with the “time modify” node: It only accept “Date&Time” columns
Hi @mwiegand and @ActionAndi, I think the purpose of “Date Modifier” is to modify the date portion of a combined date&time column, whilst “Time Modifier” is to modify the time portion of a datetime column. So my understanding is that they work only with columns that are DateTime rather than just Date or just Time.
Exactly, the Date Modifier, Time Modifier, and Time Zone Modifier work on the date/time/time zone respectively. Depending on the Modification you choose to perform, only matching data types are presented.
For example, you can only Change the date, if the data includes at least a date and a time (i.e., Date&time and Date&time with zone). For a date-only column you would always get back a column filled with one constant value. That is why Date-typed columns are not listed.
We thought about restructuring these three nodes before migrating them to the modern UI. One nice thing about first selecting the modification and pre-filtering columns based on that is that it reduces the chance of running into errors caused by incompatible types during execution.
I might see that renaming the node from “Modify date” to “Date Modifier” might have increased the potential for expecting that the node works with Date-typed columns.
Thanks for your feedback,
nan
Hi @nan ,
what is the idea behind the decision to have three different nodes that work on basically the same issue/data?
At least for me it’s confusing.
Andreas
Then isn’t the node name “Date Modifier” not quite accurate requiring a Date&Time but only accepting date. The Date modifier should work universally from my understanding.
Also, if it would be date & time, then the functionality about modifying the time is missing.
I don’t know why they were introduced this way, since they exist way longer than I am part of KNIME. When migrating the dialogs, these looked like easy ones that rarely came up in discussions, so we kept them close to their old counterparts.
From what I understand your thinking starts from the input data. In contrast, the nodes are organized by the aspect that they change, across all compatible input data types.
As I do not have a good idea from the top of my head, I suggest we observe if this collects broader interest and I listen more closely when discussions come to the date&time nodes.
Thanks for given the insights.
In contrast to the “Date Modifier” the “Date Shifter” does accept date columns. And it’s similar with the time variants.
Summarized:
Date/Time Modifier: date&time columns only
Date/Time Shifter: date / time columns and date&time columns
Date/Time Rounder: date / time columns and date&time columns
I know you have a long list of to dos but in my opinion this could be improved.
I’ll just talk about the Date Modifier, but my same discussion applies equally to the equivalent Time Modifier node…
I can see the argument for making the Date Modifier consistent with Date Shifter, and my question would be “is there a simple alternative for changing a DATE value to another DATE value?”.
I don’t think I’ve ever had this specific use case, but my initial thought on the obvious node for the job should be the Constant Value Column as it is replacing a column value with a Constant value. But on checking I discovered that it cannot actually replace a DATE column leaving it as a DATE. It can replace it with a Date&Time or a String, but not a Date!
However, in KNIME 5.8, the new Constant Value Column Appender is able to achieve it, so that is at least good news!
So, in principle I would agree that allowing the Date Modifier to modify (replace) a simple DATE does make sense, but at least in the latest KNIME there is a simple alternative.