Date&Time Widget Millisecond Bug?

I have a problem that seems to occur every millisecond or so.

When I used the Date&Time Widget’s “Use execution time” feature, it created a variable yyyy-MM-ddTHH:MM:SS.SSS (ie. 2025-06-26T08:45:23.267). When I use the variable in the Constant Value Column node, then convert that value to a Date&Time value with the String to Date&Time node. It “usually” spits out a Date&Time value.

This setup works fine until the Date&Time Widget comes across a Date&Time value like 2025-06-26T08:45:23.57. The String to Date&Time is expecting a yyyy-MM-ddTHH:MM:SS.SSS until it’s faced with a yyyy-MM-ddTHH:MM:SS.SS. And it bombs on the String to Date&Time node.

I’ve found a workaround of using the String Manipulation node to do a padRight of 23,"

I originally found this on version 4.5.1, then verified it on version 5.4.0. Remember it only happens if the milliseconds have 2 characters, so you may have to run your workflow several times before you get the error.

Is this a known bug?

Have you tried. The last S is optional?

yyyy-MM-ddTHH:MM:SS.SS[S]

3 Likes

Thank you so much!!! Biggest help. Thank you Knime mlauber71 for all your help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.