Page 1 of 1

string to decimal

Posted: Fri Jan 25, 2008 8:31 pm
by kavuri
Hi,
I am passing a text and seperating fields based on location as shown below. But as my string consists of decimal values, I am trying to convert these by using stringtodecimal function. Its resulting 00000.00 as output for that field. Let me give more details as below.

StringToDecimal(DSLink3.INPUT[58,64])

This resulting " 00000.00" as output. Where as my input looks like 0002.39

Please tell me what I can do to have appropriate results. Any sort of help is appreciated.

Thanks
Kavuri

Re: string to decimal

Posted: Mon Jan 28, 2008 12:01 am
by siddesai
Why have you got

Code: Select all

[58,64]
? Are you trying to use SubString?

I have come across similar issues and mostly it is because your output column may still be String and not changed to Decimal? Is that SubString causing issues?[/code]

Posted: Mon Jan 28, 2008 7:43 pm
by Teej
A decimal field is not 64 character long. Are you confusing that with the [start,end] of C++? It's actually [start,length].