lnCurrency = 123456.6789 * Interesting, that using VAL on a character value yields only 2 digits *lnCurrency = VAL(INPUTBOX("Enter currency value","Test",'1234.122')) lcValue = alltrim(padr(m.lnCurrency,30)) && we use big enough number and the fact that padX functions work with numbers lnPos = at(set("point"),m.lcValue) && Find the position of the digit in a value if m.lnPos > 0 lcIntPart = substr(m.lcValue,1,m.lnPos - 1) && Integer part lcDecimalPart = substr(m.lcValue, m.lnPos + 1) && Decimal part ELSE lcIntPart = m.lcValue lcDecimalPart = "" ENDIF =MESSAGEBOX("Integer part: " + m.lcIntPart) =MESSAGEBOX("Decimal part: " + m.lcDecimalPart)
>>>ex.. >>>lccurdaci=7798.697 >>>lccurdaci=RIGHT(ALLTRIM(STR(lncurrency,11,3)),3) >>>? lccurdaci....7798.697 >>>>>>