how to convert decimal to interger

lindaklu

New Member
I'm writing sql statement and I need to convert decimal field into integer field. Please suggest me which convert function supported by Progress. I am using progress v9.2.
Thank you.
 
U

Unregistered

Guest
Not sure if I'm understanding the question as you intended it, but this example might help:

DEF VAR vDecimalVar AS DEC NO-UNDO INITIAL 123.456.
DEF VAR vIntegerVar AS INT NO-UNDO.

vIntegerVar = INT(vDecimalVar).

As you should expect, the decimal value will be rounded UP when the decimal part is .5 or more, and DOWN for less than .5.

In the above example, vIntegerVar will be equal to 123.
 
Top