Hi Sandy,
>How do we find how many decimal places there are.
As Fred wrote, if you want to avoid AFIELD(), PADR() (or PADL()) will do the trick:
IIF( 20-RAT(".",PADL(
,20))==20, 0, 20-RAT(".",PADL(,20)) )
This expression evaluates to the number of decimal places after the point.
>We can't use str() because it seems to stop at the decimal point.
STR() requires the number of decimals as the third parameter. If there are more than specified, it will round the value.
Christof
--
Christof