Different int formats within a string colum

Hi all,
I have multiple integer values with different format in a column, which is recognized as string. Some numbers are decimal with a dot as separator, some do not have a decimal part.
I want to format the column as int and thus get rid of all decimal places. Problem is that some numbers don’t have those in the first place.

Hello @usrschob72,

and welcome to KNIME Community!

Can you please share some (dummy) data that is being read into KNIME as string? Or at least some screenshot? This helps a lot and speeds things up :wink:

Br,
Ivan

2 Likes

Hi Ivan, thanks for welcoming me1

Here is a picture:
image

Hello @usrschob72,

use String To Number node to convert values to Double and follow it up with Double To Int node to get integers. This should work with data provided.

Don’t know how are you reading your data into KNIME but most of reader nodes these days have option to define type so maybe you can get double type right away.

Br,
Ivan

2 Likes