Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I get csvs and one column has an average in a strange format.
e.g. 12223.8 or 23422.99999999999
I would like to store 12223 or 23422 instead.
How can I remove the dot and everything after?
Hey even I do get in the same format I work in Customer Support Industry for this you just add this
row3.Handle_Time_Total_Seconds.intValue()
.intValue() will stop the values after the decimal point
Convert from float or doubleto int. Should be enough.
How?
When I try Double.parseDouble(row1.data).intValue() I get an error.
Detail Message: The method parseDouble(String) in the type Double is not applicable for the arguments (Double)
Hey even I do get in the same format I work in Customer Support Industry for this you just add this
row3.Handle_Time_Total_Seconds.intValue()
.intValue() will stop the values after the decimal point
Hi,
below code will give you an idea how to remove all character after dot from a decimal value.
Double a = 23422.99999999999; System.out.println(a.intValue()); String b = "23422.99999999999"; System.out.println((int)Double.parseDouble(b));
You can write the above code in tjava component and run it.
--
Please give Kudos and mark topics as solved where appropriate.
I'm new to Talend, but my next project involves a lot of csv imports and I think Talend would be the right tool for it, just need to understand it better.
Right now I kinda a bit feel stupid, because nothing seems to work.
Is there something I could do wrong with the csv?
tMap always throws an error, even when I say the data in the csv is double and I just want to save it in my DB as double without any cast.
Both (input / output) double "can't cast from int to double"
csv double - target int - using your tips "can't cast from string to int"