remove commas from double value

Hello,
I have a column with double values, e.g. 132,755,972,961 and need this number as a string and no comma. Which node could convert that? The node “Double to Int” doesn´t work and the string value would be even better.
Has anyone some idea?
Many Thanks.

It is not clear how do you have the number. Did you loaded it in KNIME. If yes use String Manipulation to do what you need.

Hi, thanks for your request.
I have a csv file, which I read in via a node “csv-reader”, this outputs this strange value. It is an article number and I need this number without commas. Since it is a double value, unfortunately I can not continue with the node “String Manipulation”, or what function could I use in this node?

Hi @nicole,
if you use the File Reader node to read the csv file, you can set the type for each column in the configuration dialog by right-clicking on the column header. Then you do not need to do any conversions.


best,
Gabriel
3 Likes

The gab1one way is preferred. But if you need to convert see below:
image

2 Likes

It´s perfect, thank you.
But there is another column, it doesn´t work: the same csv file has a column with a string value, it contains a date+time but I can´t change it in a date&time field. Not in this “File Reader” and not with “String to date&time” node. This date is like “30. Jan 2019 09:33 PM MEZ” - I tryed a lot, but all is wrong.
Do you have an idea?
Thank you so much.

Thank you, it works good, but I prefered the doing with the file reader.
Maybe you also have an idea about my date problem?

Use this format: dd. MMM yyyy HH:mm a
In String to Date/Time (legacy) node then convert it to the new format if you need.

3 Likes

ok, this works partly, but not for all of the values.
This is the warning message:
WARN String to Date/Time (legacy) 6:278 Couldn’t parse 72 row(s) due to parsing errors (data format wrong?)

Dez is not English Dec. I do not know how customize KNIME to the national date format.

I can change the values ​​for the German term of the month “Dez” to “Dec” with the “string manipulator”, I have to do that for every month that does not have the same name in German. Then the node “String to Date&Time legacy” works. Thank you very much, it´s not a simple way, but it works :slight_smile:

2 Likes

Hi @nicole!

You do not have to change term Dez to Dec because in new Time&Date node you have option Locale which determines the language and geographic region for terms such as months or weekdays. Here is the print screen with rest of configuration:

Hope it helps :wink:

Have a nice day,
Ivan

4 Likes

Hi Ivan,
thank you very much, it works better and easier.
I had already tried this node, and I know the local setting, but it did not work last week. Probably there was another mistake in it or it was too late at night :slight_smile:
Have a nice day too
Nicole

2 Likes

Ivan, somehow new Time&Date node is less robust then an old one. KNIME team needs to improve it.

2 Likes