Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String to number conversion

Hello to everybody,

how can I convert ( in LOAD SCRIPT)  the string 123456.34 to number  123456.34?

And for negative value string -123456.34 to number -123456.34

I have tried the instruction Num( ) but I cannot understand the syntax to manage the negative value

Regards

Oronzo

1 Solution

Accepted Solutions
Not applicable
Author

Hello

i have tried Num() and Num#() but for negative value, the string remains string and I cannot display on a chart

this is my load script

LOAD

Num#(Totale,'0.0') as Totale,

...........................

FROM

.....

Regards

Oronzo

View solution in original post

5 Replies
Not applicable
Author

Hi,

   You can try like num(field) as field_name

Ex:

Num(String_field) as No_Field

-Jai

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Num() handles negative values also.

     Check it whether you have null values in your field.

     You should use like this

     Load

          Fields,

          Num(Field) as Number

     From..

Hope it helps

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

Hi,

You can Num() or Num#() to format String to Number. 

Regards,

Jagan.

Not applicable
Author

Hello

i have tried Num() and Num#() but for negative value, the string remains string and I cannot display on a chart

this is my load script

LOAD

Num#(Totale,'0.0') as Totale,

...........................

FROM

.....

Regards

Oronzo

Not applicable
Author

Thanks to everybody,

it was simply a problem with format number

if I use in the load SCRIPT

Num#(Totale,'0.00') as Totale,

it works fine

Regards

oronzo