cancel
Showing results for 
Search instead for 
Did you mean: 

GetItemDecimal Vs GetitemNumber

Former Member
0 Kudos

What is the difference between GetItemDecimal  and GetItemNumber ?

Decimal is not a number?    

Ty

Gimmy

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

GetitemNumber returns a double and GetItemDecimal returns a decimal.

I believe the GetitemNumber was used originaly for all kinds of numbers; GetItemDecimal got introduced in a much later version.

A double is a floating point number like 1.23 * 10 ²³ (power of 10)

A decimal number is a fixed point number like 0.43283

They are typically used in different communities.

Floating points are very popular in the scientific community for all kinds of math.

But at finance in general they don't trust floating point numbers because they are affraid of losing a cent in rounding and are using fixed point.

Mixing both kind of numbers in calculations, operations, applications or tables should be considered bad style.

Regards,

Ben

Former Member
0 Kudos

Hi Gimmy;

  Yes, decimal is a number but - it requires special handling (transformation) when manipulating. Its a special number that can be either fixed or floating in format plus it also has a precision ( which is not required when handling all other numeric data types). Thus, the special GetItemDecimal ( ) method. 

HTH

Regards ... Chris

Former Member
0 Kudos

GetItemNumber is for long or integer datatypes and GetItemDecimal is for decimal datatype.

Former Member
0 Kudos

Good question!

In documentation you can find:

GetItemNumber: Returns the numeric value in the specified row and column (decimal, double, integer, long, or real)

GetItemDecimal: Returns the decimal value

But in real I know no differences. I always use the GetItemNumber function.