cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent++String to Number

Former Member
0 Kudos

Hello,

I have a qty field which we get as 400,000. I need to pass this into mapping as a whole integer.

Do let me know how to do it.

As it is a qty field , we are not expecting any decimal notation.

regards,

B.Anandh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

if you want to have no decimals you can use the standard function 'FormatNum' and define it their with a double click.

Regards

Patrick

Former Member
0 Kudos

Hi,

We dont require decimals, but when i used formatnum, it was giving error.

canyou put some light on this.

Former Member
0 Kudos

Hi,

The format num doesnt convert string data, it converts only . to , and not vice versa. I did checked it out.

Former Member
0 Kudos

Hi,

You can do one thing here ,as to use Round API to round up the values.

Source Field --->Round -


> Target Fields

Source Field ---> (Multiply with 1.00) -


>FormatNumber Or Round ---> Target Fields

Either Make the Data type as Integer for this source field or then you have to go for UDF

Thanks

Swarup

Edited by: Swarup Sawant on Feb 25, 2008 5:42 PM

Former Member
0 Kudos

Hello,

now i got it!

Your problem is the ',' instead of '.'

Then you can use the 'replaceString' function before the 'FormatNum'.

With this parameters:

replaceString:

First input: your source string

Second input: ,

Third input: .

Format Num:

#

Regards

Patrick

justin_santhanam
Active Contributor
0 Kudos

Anandha,

Are u getting the input as 400,000 . Comma seaprated in it?

raj

Former Member
0 Kudos

Anandha:

Just a suggestion. I guess you can use UDF where using string functions remove the extra characters (like ',' etc) and convert the string to number or whole number and then you can assign to the target field

Answers (0)