on 06-19-2014 8:44 AM
What is the difference between GetItemDecimal and GetItemNumber ?
Decimal is not a number?
Ty
Gimmy
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
GetItemNumber is for long or integer datatypes and GetItemDecimal is for decimal datatype.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.