[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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads