Hi i have this operation:
Field 1 type decimal
Field 2 type decimal = 672
Field 3 type double = 5
The code is:
field1 = field2 - field2 * (decimal?)field3 * -1;
the result i'm wating for is -> 672 - 672 * 5/100 = 638,4
instead in field1 have 4032...
in other record the result is ok
thanks
Amit MohantyPosted Jun 22, 2023, 1:28 PM
If you want to calculate
field1as 672 - 672 * 5/100 (which equals 638.4), the correct code would be:Mic GotPosted Jun 22, 2023, 3:04 PM
Perfect, i thought it was an error conversion.
Thks again