on 11-15-2006 7:59 AM
Hi,
In my scenario I have to covert indian rupees to USD.
For this I am creting 1 user defined function.
Can u tell me the package which to be be importing.
Thanks,
SrinivasaP
Hi,
There is no need to import anything
public String convertRupeetoDollor(String a,Container container){
return String.valueOf(Integer.parseInt(a)*45);
}
You can specify value.
If you want to use current value of conversion rate you can use external web service Currency Converter
Regards,
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You would need to use value mapping for this.
As this way you can avoid hardcoding conversion rate inn your coding.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Your UDF by default imports
java.lang.*;
java.io.*;
java.lang.reflect.*;
java.util.*;
If you are using methods from other than the above said packages then you have to explicitly import those classes.
Regards,
Sudheer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am not sure if u need any additional package here.
try this udf;
Double temp = 0;
Double dollar = 50;
assume it to be 50
temp =Double.parseDouble(a<i>);
temp = temp * dollar;
result.addValue(temp.toString());
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
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.