Whoops!!!
Sorry, the line below - "lnDot = at('.', y)", of course, should read:
lnDot = at('.', lcNum)
Don't ask.
Alan
>? GetDecimals(1233456.778900000)
> 9
>
>
>Function GetDecimals(pnNum)
>Local lcNum, lnDot, lnRetVal
>
>* pad to arbitrary size
>lcNum = Alltrim(Padl(pnNum, 1000))
>lnDot = at('.', y)
>
>Return IIF(lnDot = 0, 0, Len(lcNum) - lnDot)
>
>
>
>>How can I find the position of the decimal point in a numerical value. I tried to convert the number to string but it rounded the value.
>>
>>thanks
>>Nick