Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trim trailing zeroes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01586185
Message ID:
01586404
Vues:
65
>I'm embarrassed to ask this:
>
>I can't figure out how to display a numeric value with the trailing zeroes trimmed. So, if the value is stored in the table as 88.99000, I want the value to display in a report as 88.99.
>
>Thanks,
>
>Yossi

It's not exactly what you're asking, but I use this technique:

lnValue=88.9900
IIF(MOD(lnValue,.01)=0,ROUND(lnValue,2),lnValue)

You could build it out like:

ICASE(MOD(lnValue,.0001)=0,ROUND(lnValue,4),MOD(lnValue,.001)=0,ROUND(lnValue,3),MOD(lnValue,.01)=0,ROUND(lnValue,2),lnValue)
Brandon Harker
Sebae Data Solutions
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform