How to format

Hi everybody,

I would like to set a rule for having all the time a specific format already in knime and not only in an excel as output, This would be in order to have a clear report.

The specific problem is:

I have a number which is 12,758,242.85 and if i convert into a string will be 1.2758242850000001E7.

My final output would be like:


Thank you very much. Same would be appreciated in the case of percentage:
0.51 --> 51%

I am trying to use Data visions etc etc.


are the values in separate or one column? Maybe some sample data would be useful to get a better understanding of your desired outcome.

Kind regards

Hi. Am I correct to assume you would like to format numbers such that the ‘thousands separator’ should be an apostrophe instead of a comma? For example how they format numbers in Switzerland?

Here’s a quick and dirty solution using Java. (I created a metanode you can copy into your own workflow and configure). Import the attached .knwf file into your KNIME desktop explorer.
The metanode can be configured with the column of (double) numbers you want to format, and the formatting pattern string (see for pattern syntax). Although the thousands separator is specified with a comma in the pattern, it will be replaced with apostrophe in the output.
Example output:

custom decimal format.knwf (14.2 KB)


Hi there @dnaki,

nice one!

Don’t know if you know but you can share your ideas/solution/Components on KNIME Hub as well :wink:


1 Like

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