Change years and months to months only

Hi,

I’m new to KNIME and still trying to understand the basics, but I need to change a string in a column from for example “22 years and 6 months” to, months only. How do I do this please. Sorry if its been asked before, but I can’t find a solid lead.

Hi @Tropicpalm, Could you please post a small table with some dummy data to avoid any assumptions? That way, a decent solution can be provided.

Sure can @kamtaot :

image

Oh - can you see this?? Need to remove the NA rows and change to, for example, 265 months.

@Tropicpalm , I am attaching a workflow to achieve it. Please check and modify accordingly.


Years_to_Months.knwf (77.2 KB)

3 Likes

Thank you so much - you make it look so easy :slight_smile:

Hi @Tropicpalm , :pray: Happy to know that it worked for you and thank you for marking it as a solution.

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