String to Date&Time weird result

Hey guys,
I’m new to Knime and I’m probably doing something wrong here.

I want to convert a string column to date&time column but the result that I got is a bit weird.
It seems that the String to Date&Time node worked fine converting this column, but it’s adding a letter T between the date and the time.

Any idea of what I could be doing wrong?
My string format was “guessed by Knime” as yyyy-M-d HH:mm:ss
An example of this data is 2019-5-1 00:00:00

Cheers!

@cperazza welcome to the KNIME forum.

It is an ISO_LOCAL_DATE_TIME

https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

But it should be stored as some kind of number internally. If you would convert the datetime back to string you could remove the T. You could read more about date and time here:

https://www.knime.com/blog/the-new-date-time-integration

If you want to play around with date and time here is an example

https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_date_string_format

5 Likes

Hi @mlauber71, thanks a lot for the info you shared!
I sorted it out transforming my initial string to date&time than I changed it back to string in the format I need (dd.MM.yyyy), and I converted it again to date.

It’s working!

cheers

2 Likes

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