Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Comma
Message
De
12/05/2005 11:05:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/05/2005 11:00:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01013415
Message ID:
01013421
Vues:
12
>Hi, i need some help with this.
>
>i don't know how to do this.
>
>number i got ej."1,260.05"
>i want to convert the "string" to a number
>whenever i do val("1,260.05") but the result is 1.00 not 1,260.05

Eliminate the comma first. strtran() will do the "search and replace" operation (see also chrtran()).
? val(strtran("1,260.05", ",", ""))
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform