[resolved] Suppress Exponent in a double format

One Star

[resolved] Suppress Exponent in a double format

Hi everyone,
I need to obtain a double which has no exponent in an csv file. The file is from a tfileOutputdelimited.
In my files I got these things : 3.53435E12 and I need 353435000000.
And I also need to keep the decimal if there are any.
I tried a few things on the tmap but I could'nt find any solutions.
Someone has any idea ?

Thanks,

Accepted Solutions
Community Manager

Re: [resolved] Suppress Exponent in a double format

Hello
I tested it on tJava:
	double d = 3.53435E12;
java.text.DecimalFormat df = new java.text.DecimalFormat("#.#");
String s=df.format(d);
System.out.println("d = " + s);

result:
tarting job forum7601 at 10:13 04/08/2009.
d = 3534350000000
Job forum7601 ended at 10:13 04/08/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] Suppress Exponent in a double format

Hello
I tested it on tJava:
	double d = 3.53435E12;
java.text.DecimalFormat df = new java.text.DecimalFormat("#.#");
String s=df.format(d);
System.out.println("d = " + s);

result:
tarting job forum7601 at 10:13 04/08/2009.
d = 3534350000000
Job forum7601 ended at 10:13 04/08/2009.

Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Suppress Exponent in a double format

thank you for the answer

Re: [resolved] Suppress Exponent in a double format

And how to achieve it in tMap?
Community Manager

Re: [resolved] Suppress Exponent in a double format

And how to achieve it in tMap?

Create a method in a routine to do it, the method requires an input parameter, you just need to call the routine and pass the incoming data as input parameter on tMap.
----------------------------------------------------------
Talend | Data Agility for Modern Business