Discussion

3
Replies
3640
Views
Close popover
Krishna Chaitanya Paruchuri (Krishna_Chaitanya)
Commonwealth Bank of Australia

Commonwealth Bank of Australia
AU
Krishna_Chaitanya Member since 2016 10 posts
Commonwealth Bank of Australia
Posted: June 12, 2018
Last activity: March 23, 2019

How to round off the value of decimal property to certain precision point?

This can be achieved through the custom java function.

Java Code:

long factor = (long) Math.pow(10, PrecisionSize);
Value = Value * factor;
long tmp = Math.round(Value);
return (double) tmp / factor;

Value and PrecisionSize are the parameters for this function.

Data Integration Java and Activities Developer Knowledge Share