Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple question about numeric in the character field....
Message
From
11/10/2003 04:21:56
 
 
To
11/10/2003 03:49:57
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00837786
Message ID:
00837791
Views:
28
>hi
>thanks for ur reply
>but u know what exait i am need
>for example : "test = ret..369" i need only 369 &
>field lenght also not fixed so i need to fetch only numeric number.
>
>regards

Mazahir, if you just want to extract the numerics from a string then you can use:
cOrgText = "ret..369"
cNewText = CHRTRAN( cOrgText, CHRTRAN( cOrgText,"0123456789", ""), "" )
? cNewText                && Returns 369 as string
? VAL( cNewText )         && Returns 369.00 as numeric
? INT( VAL( cNewText ) )  && Returns 369 as numeric integer
? LEN( cNewText )         && Returns length 3
HTH
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Reply
Map
View

Click here to load this message in the networking platform