>>This is already in the FAQ for two days now, but Nick told me to post it here:
>>
>>As described in the help, padr('abc',20) will give a string with 17 trailing blanks - but try padc(12, 13), or padl(date(), 20) - you will get a string containing the string representation of number 12 or today's date, padded with blanks (or any other string you choose) on the side of your choice.
>>
>>Try padc(datetime(), 80, '-*- ') and see what you get.
>
>Yeah, I think it is an excellent tip, and also wanted to add
>that, for example, PADL(12.4590, 12) gives you " 12.4590",
>so ALLTRIM(PADL(12.4590, 12)) could be used instead of STR() and this way there is no need in counting the length of field/variable with decimal point and number of decimal points (like in STR(12.4590, 7, 4). And instead of 12 you may put any number which is for sure bigger than the lenght of the your field/variable. Just another way of doing things...
>
>Nick
Excellent!!
The number of times I've had work out the number of decimal places to use str(x,y,z).
This will definately save me a lot of time/effort in the future ;-)
Jason
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only