Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transform doesnt works always
Message
De
25/08/1998 04:18:23
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00129326
Message ID:
00129590
Vues:
21
>padl(alltrim(transform(str(678,6), "@R 999,999")),7,'0') should do the trick.

This does not respect the settings of 'point' and 'separator', using always a ',' to thousands separator, but i know i can do it with a function:

SUBSTR (transform (mynumber + 1000000, "@L 999,999,999"), 5, 7)

And ¿Is not amazing needing to write functions to do that?
Thanks anyway


>
>>Hi all. I'm back from my holidays
>>
>>A custom wants the code of his products were printed always (always) with zeros in the left side and thousands separator.
>>
>>The problem is when the numbre is < 1000: fox replace separator with another zero.
>>¿Some other idea?
>>¿Must i write a routine to converting in a string like long time ago?
>>
>>trans(45678, "@L 999,999") returns 045.678
>>trans(678, "@L 999,999") returns 0000678
Saludos,
A.G.P.
---------
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform