I'm not sure, but Date in Knime are ?!!@@#@#° !!
How to find the Week from a string or from a date
Simple but I'm trying for 2 days (!) with Calendar, String to Date, Gregorian,.....
;-)
MitchP
I'm not sure, but Date in Knime are ?!!@@#@#° !!
How to find the Week from a string or from a date
Simple but I'm trying for 2 days (!) with Calendar, String to Date, Gregorian,.....
;-)
MitchP
2 days are long (long is also a date).
How about converting the string to a date column ("String to Date/Time") and then using the "Time to String" node to extract the week. It should be a simple 'w'. The node description to the Time to String node has all the important ones. Here is a copy:
Valid pattern elements are:
Many, many many thanks.......
I saw that listing on "String to Date" but didn't try with "Time to String".....
and the retuned week is based on US Calendar....
All the best, wiswedel
Does the String to Date/Time node only extract date elments, or can it introduce them if they are not present? So can you say extract week in year from "yyyy.MM.dd" or does the the week element need to present before it can be transformed to "yyyy.ww"?
All the best,
Mark
Hi Mark,
After transforming string to Date "String to Date/Time, dd.MM.yyyy", select the "Preset Date/Time" node with "replace missing value", and after extract the Week with "Time to String, w" node.
;-)
MitchP
Works like a charm. Thank you for your help.