String to Date doesn't recognize format

hi there
i have a format looking like this “2023-09-11 09:59:20 +0200” and I need to extract just the date and make it a date field instead of a string field.

If I use the String to Date node, it doesn’t recognize the date format. any suggestions?

You can “overwrite” the format in the string to datetime node yourself. Just click in the box and adjust it to your format. The node description might also help
br

1 Like

Hey @joelsteinmann,

Thank you for your post. It will surely be helpful to many people.

You can use the String to Date&Time – KNIME Community Hub by configuring the New Type as “Date&Time with zone” and customising the Date format placeholder. Please find attached a screenshot displaying the configuration of the node. :point_down: :framed_picture:

Additionally, I am providing you with the placeholder code that can be easily copied and pasted into the node settings:

yyyy-MM-dd' 'HH:mm:ss' 'xx

I hope this helps you to continue using KNIME in your daily life.
:knime:

3 Likes

thank you. that worked.

that didn’t help. I split the string with the cell splitter and then I was able to transform the date to my needs.

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