Failed to convert string to date

I read a table from a database and convert columns to correct data types with the Column Auto Type Cast node. I have some columns with date strings with missing values which are indicated by empty string. Everything works well in the GUI. However, when I run my workflow from the command line the type case node fails to convert the strings and this seems to be because it doesn’t recognize the empty strings as missing values. I checked that the input data is exactly the same in both cases. Any idea why running the workflow from command line does not correspond to the GUI?

Could there be any workarounds? I could use the String to Date&Time node as well, but there seems to be no option for missing values.

are you aware that there are Missing value nodes?

I quick solution would be to convert your blank strings to null values. Then KNIME will ignore them in the casting process. Though there is a MISSING VALUE NODE, my favorite solution is to use the STRING MANIPULATION node. Strip away all spaces and then convert to null if all blank. Like this:

  tonull(stripstart(stripend)))
2 Likes

Thank you, I got this working with a work-around. However, I’m still worried that execution through GUI and from command line can produce different results.