Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The easiest way
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01233268
Message ID:
01233563
Vues:
8
>>>>Hi everybody,
>>>>
>>>>Can this
>>>>thisform.GrandTotal = 2000.13
>>>>PADL(STRTRAN(TRANSFORM(THISFORM.GrandTotal),".",""),17,"0")
(e.g. implied decimal)
>>>>be simplified?
>>>>
>>>>Thanks.
>>>
>>>WAIT WINDOW PADL(TRANSFORM(GrandTotal*100),17,"0")
>>>
>>>Of course that would work IF you have only two digits after the decimal point. If they vary your code is the way :o)
>>
>>You don't even need transform, PADL works with numeric. Now, thanks a lot, I could not see this simple solution myself, too much of solving others' problems :) Yes, I only have two decimals.
>
>HA!!!!!!!
>THANK YOU!
>I always transform one way or another before I pass the parameter to the PADx() function.

BTW, you know what? Without transform it doesn't work the way I wanted :) It shows .00 at the end :)

So, you were absolutely correct with your suggestion.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform