
Contributor II
2023-05-20
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How i can convert double in Integer
Hi,
How i can convert double to integer(int) in Talend.
1,013 Views
1 Solution
Accepted Solutions

Anonymous
Not applicable
2023-05-21
08:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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();
1,013 Views
2 Replies

Anonymous
Not applicable
2023-05-21
08:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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();
1,014 Views

Contributor II
2023-05-22
04:07 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
1,013 Views
