Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How i can convert double to integer(int) in Talend.
Hello @THIERNO DIALLO ,
There are 2 possible solutions:
Solution 1:
double data = 3452.345
int value = (int)data;
Solution 2:
double data = 3452.345
Double newData = new Double(data);
int value = newData.intValue();
Hello @THIERNO DIALLO ,
There are 2 possible solutions:
Solution 1:
double data = 3452.345
int value = (int)data;
Solution 2:
double data = 3452.345
Double newData = new Double(data);
int value = newData.intValue();
hi achen,
Thank you for your answer .
My solution is similar to your first suggestion and it works fine.
Thanks again for your feedback.
(int) Math.round(my double data)