Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to output zerofilled text from query of numeric f
Message
 
À
13/05/2003 08:38:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00787664
Message ID:
00787673
Vues:
14
>Thank you ahead for helping me with this simple question.
>
>I have a query in which I am reformatting fields from a table and building an All Text file. I am looking for a function or expression that I can place in the output field that will zerofill the leftmost positions of the character output.
>
>I am currently using str(penaltyamt,9,2) to get a nine character field with decimal places.
>ex.
>" 900.00"=STR(pnlty_amt,9,2)
>This, as you know does not give me leading zeroes. Is there a function to accomplish this?

Try:
padl(allt(STR(pnlty_amt,9,2)),9,"0")
Einar
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform