Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I - DATETIME, CURRENCY field conversion
Message
 
À
18/01/1999 09:24:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00175745
Message ID:
00177164
Vues:
38
Hi Bernard,

>Would you believe that until a few days ago(2) I always used the STR() to convert a number to char before using RPAD(),LPAD().

It took me years to realize that PADR() and PADL() can take any data type. *bg* Just be aware of one thing though, PAD always uses the precision of the number it converts, ie:
 a = 1.0
 ? ">"+PADL(a,5)+"<"  && ">  1.0<"
 a = 1.00
 ? ">"+PADL(a,5)+"<"  && "> 1.00<"
 a = 1.0026
 ? ">"+PADL(a,5)+"<"  && ">1.002<" 
Christof
--
Christof
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform