Hi All,
In on of the postings I found the follwing solution mentioned for converting the String to Integer in Data Stage Server Canvas
"Code:
If Num(inlink.column) Then Iconv(inlink.column,"MD0") Else 0
The Iconv function will remove thousands delimiters and currency symbol. It will also round to the indicated number of decimal places and NOT return the decimal place holder character."
When I used this code for a value 3,990 it is returning a 0 but when I used the following code
A=Iconv(inlink.column,"MD0")
A+=0
If Num(A) Then Ans= A Else Ans=0
it is working fine.
I understand that when we add a zero or do an arithmetic operation the value is automatically converted to Numeric value but I am wondering why it didn't work with the first solution.
Thanks in advance for the replies,
Anand
String to Numeric Conversion
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 55
- Joined: Tue Feb 24, 2004 8:17 am