Change string MMM-yy into into separated column of month and year

Hi, I have another problem with the converting date. In another database, I am working with a data format for monthly reports. The company writes as MMM-yy (ex: Oct-19), but this format detects as a string in KNIME.


I want to have a separated column for the “month” and “year” only. Firstly I thought I just need to convert from string to date then use “Extract date & time field” node to extract month and year.

Then, I got an error when tried using “string to date” node. I used the format below.

error message:
ERROR String to Date&Time 2:4 Execute failed: Failed to parse date in row 'Row103: Text ‘Oct-18’ could not be parsed: Unable to obtain LocalDate from TemporalAccessor: {MonthOfYear=10, Year=2018},ISO of type java.time.format.Parsed

Is there any way to convert string MMM-yy into a separated column of month and year?
Thank you

Hi @ekayani

See this topic with a similair problem (solved).
If you want to split the cell into MMM and yy use the Cell Splitter node, with a “-” as delimiter.

gr. Hans


Hi there @ekayani,

node Extract Date&Time Fields requires Date&Time column as an input. Won’t work with string column.


1 Like

Thank you @HansS , it works in this case


Thank you for remind me @ipazin

1 Like

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