Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two-digit currency values with floating $
Message
De
25/05/1999 16:26:38
 
 
À
24/05/1999 22:11:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00222286
Message ID:
00222658
Vues:
24
>>Format it as $$,$$9.99. This will force the display of the 3 'positions' shown with '9' as numeric characters - 0 if there is no value in that position. The '$' symbol say to put the dollar sign directly to the left of the right-most non-zero number.

BTW. If you enjoy totally obstruse solutions, here's one I found that also works.

To print out x as a currency value with two decimal digits and a floating "$"

"$" + str(x,int(log10(x))+4,2)

Enjoy!
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform