can't convert string in date time

hi I can’t convert string to date time I test all the format but it doesn’t work .
here is my knime project join with the excel file.

Desktop.xlsx (500.7 KB)
data.knwf (7.6 KB)


You can do some simple pre-processing and then use Palladian’s Date Extractor node, it’ll handle most date formats automatically without any manual configuration:

Before the Date Extractor place a String Manipulation node which transforms the date strings into a parseable format:

join(replace(substr($datetime$, 0, 11), "/", " "), " ", substr($datetime$, 12))

This will change the input format 10/Jul/2005:04:31:18 to 10 Jul 2005 04:31:18.

1 Like

Hi @willson,

In addition to the solutions by @qqilihq and @quaeler , you could also use the String to Date/Time (Legacy) node using this date&time format:

Then if you like you can convert it to the standard date&time by using the Legacy Date&Time to Date&Time node.



Hi there all,

to my knowledge Jul, Nov, Sep are not localized french terms for month :slight_smile:

If you chose different locale (for example en-US) dd/MMM/yyyy:HH:mm:ss works just fine.



Hi all,

I think the answer of @ipazin is the solution of this topic. Thanks for the investigation! Setting the correct locale will resolve the issue. Could you confirm that and mark his answer as the solution if it’s working, @willson?



I Just Make a simple Java snippet to solve the date format problem, please check the attached file. I hope It helps you
dataSolver.knwf (9.4 KB)

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