Mic Got

Mic Got

  • 1.6k
  • 100
  • 7.8k

calculation error conversion

Jun 22 2023 1:05 PM

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

 

 


Answers (2)