Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transform() back to Numeric
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00722042
Message ID:
00722064
Vues:
14
I assume that you have randomly assigned separator ("," or ".") but always the decimal portion.

?val(iif(right(lc,3)=".",chrtran(lc,",",""), chrtran(lc,",.",".")))

>
>It does for that instance but not if the value had been transformed into "12.345,67" in which case it returned 12.3457
>
>
>>
>>This may help:
>>lc="12,345.67"
>>?val(chrtran(lc,",",""))
>>>Hi all,
>>>
>>>Does anyone know of a quick and easy (to be used in a select statement) way to convert a transformed amount back to its value.
>>>
>>>If I originally had the number 12345.67
>>>this has become the string "12,345.67" or "12.345,67" depending on the separators.
>>>
>>>and now I need to do a numeric > or < so I need it as a number again.
>>>
>>>Any ideas?
>>>PS I can't store it as both so that is not an option.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform