on 04-07-2010 7:11 PM
Hi Friends,
I have source value coming as 257.565. we need to get the output as 257.57,
When the value is coming as 257.565 in PI we shloud get as 257.57
Kindly do the needful ASAP.
rENU
Renu,
Try the below UDF.
Single input , and import - java.math.*;
BigDecimal bd = new BigDecimal(var1).setScale(2, BigDecimal.ROUND_HALF_UP);
return bd.toString();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Renu,
Use standard function "FormateNum" it rounds the number automatically as per the formate required.
The UDF will not be flexible enough to handle variable lenght of number.
Thanks,
Sunil Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi Friends,
>
> I have source value coming as 257.565. we need to get the output as 257.57,
>
> When the value is coming as 257.565 in PI we shloud get as 257.57
>
> Kindly do the needful ASAP.
>
> rENU
Have you ever tried the std Arithmetic func to round the values...
If not kindly try them ASAP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.