Page 1 of 1

Decimal format

Posted: Tue Aug 05, 2014 6:53 am
by altruist
Hi,

I am slightly confused with decimal format. Can you please clarify the below to me.

DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99

Am I right over here?

Posted: Tue Aug 05, 2014 9:24 am
by qt_ky
The first argument is total number of digits. The second argument is number of digits after the decimal point.

Posted: Tue Aug 05, 2014 11:58 am
by altruist
Does the first argument include or exclude the sign.
DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0 OR Minimum Value = 0.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99 OR Minimum Value =-99.99

Posted: Tue Aug 05, 2014 6:07 pm
by ray.wurlod
The first argument does NOT include the sign. The definition ("digits") is correct.

Posted: Tue Aug 05, 2014 9:17 pm
by altruist
So in my case, are the highlighted one's the correct values
DECIMAL[1,0]
Maximum Value = 9.0
Minimum Value = -9.0 OR Minimum Value = 0.0

DECIMAL[5,2]
Maximum Value = 999.99
Minimum Value = -999.99 OR Minimum Value =-99.99

Posted: Wed Aug 06, 2014 3:43 am
by ray.wurlod
Minimum value for signed decimal[1,0] is -9.0.
Minimum value for unsigned decimal[1,0] is 0.0.
Minimum value for signed decimal[5,2] is -999.99.
Minimum value for unsigned decimal[5,2] is 0.0 (which is the same as 000.00).