Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Character to Numeric
Message
From
21/11/2021 11:31:55
 
 
To
21/11/2021 11:29:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01682754
Message ID:
01682755
Views:
39
>Howdy and grand rising all,
>
>I have several fields adopted as character but need to be numeric. Data that currently exists in the fields are represented as characters and for example: -1.72% or 33.23%.
>All of them have the percent sign in them hence why prior folks made it character. I need to convert to numeric in order to perform sorting from asc to desc as well as calculations. I'm running the following code but it's tell me too few arguments. I am also concerned the impact this would have if i placed within a Scan that is used to draw that data from a source table and insert into a new table with the fields being set as numeric.
>
>* ?VAL(STRTRAN(SourceData.SalesPergain),"%",,"")
?VAL(STRTRAN(SourceData.SalesPergain,"%",""))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform