Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple question about numeric in the character field....
Message
De
11/10/2003 04:21:56
 
 
À
11/10/2003 03:49:57
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00837786
Message ID:
00837791
Vues:
27
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform