Ardilla
September 30, 2024, 3:21pm
1
I’m having trouble with this node in cases where I have dd-MMM-yy format, for cases that I want to identify birthday.
For instance 22-Jan-84, Knime it is identifing it as 2084-01-22 and not the correct way that it should be 1984-01-22. Is there a simply way to correct this?
ArjenEX
September 30, 2024, 3:30pm
2
What’s the configuration of your node?
Ardilla
September 30, 2024, 3:42pm
3
This are examples of the error:
takbb
September 30, 2024, 3:54pm
4
Hi @Ardilla , may I suggest my Parse Date&Time component which should be able to handle this for you, as it allows you to specify the “cut-off” year at which 2 digit years will be considered to be 19xx or 20xx
I don’t know of a way of configuring the 2 digit year cutoff in the standard node.
Edit: You may be interested in the following post:
I must confess to being very surprised by KNIME’s handling of 2 digit years in this regard, as it is a different scheme to Java on which I had assumed it would be based. It is also different to Excel which is similar but subtely different to Java.
Take a look at the table beolw of 2 digit year dates entered in Excel. The second column is Excel’s interpretation of those dates using the Excel formula DATEVALUE()
[image]
Processing the first column in KNIME using String to Date&Time gives the th…
This follow up post gives an explanation of KNIME’s behaviour:
KNIME actually follows the Java approach. Internally it uses java.time which supersedes the java.util date functionality. From the documentation:
Year : The count of letters determines the minimum field width below which padding is used. If the count of letters is two, then a reduced two digit form is used. For printing, this outputs the rightmost two digits. For parsing, this will parse using the base value of 2000, resulting in a year within the range 2000 to 2099 inclusive. …
This might s…
3 Likes
system
Closed
December 29, 2024, 5:01pm
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.