Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I - DATETIME, CURRENCY field conversion
Message
 
To
18/01/1999 09:24:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00175745
Message ID:
00177164
Views:
37
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
Previous
Reply
Map
View

Click here to load this message in the networking platform