Reading values from a Database with 4 decimal places, I want to print only the number of decimal places in use, eg
00123.0015 will print 123.0015
00456.1200 will print 456.12
00789.1230 will print 789.123
I tried using an IF THEN ELSE using a variable defined as
IsThousand := (QTD % INT(QTD) * 100) % INT(QTD % INT(QTD) * 100) <> 0
but it gives the wrong answer in the second part of the equation, eg. INT(59.1100 % INT(59.1100) * 100) = 10 (should be 11?).
(1) Is there another way to do this?
(2) Is there an error with the INT function?
Thanks in advance.
00123.0015 will print 123.0015
00456.1200 will print 456.12
00789.1230 will print 789.123
I tried using an IF THEN ELSE using a variable defined as
IsThousand := (QTD % INT(QTD) * 100) % INT(QTD % INT(QTD) * 100) <> 0
but it gives the wrong answer in the second part of the equation, eg. INT(59.1100 % INT(59.1100) * 100) = 10 (should be 11?).
(1) Is there another way to do this?
(2) Is there an error with the INT function?
Thanks in advance.