Problem with decimal places

rhardoyalrhardoyal Member Posts: 78
Hi,

I am having some problem while formatting decimal places as follows:

I have defined a variable Amount as decimal and this variable is storing the sum of a few fields which are in turn in decimal (from table)

However the variable Amount is storing the values as 80909.78909877 that is more than 2 decimal places.

I want the value to be displayed in 2 decimal places, so I have used the format function as FORMAT(Amount,0,'<Integer><Decimals,3>')

The values are displayed in a file as 80909***. All values are having 3 asterisk.

Can anyone please help on this issue.

Thanks,
Rizwana

Comments

  • ChinmoyChinmoy Member Posts: 359
    you can try:

    FORMAT(ROUND(Amount,0.01), 15, '<Integer><Decimals,3>');
  • rhardoyalrhardoyal Member Posts: 78
    thx a lot... it works
  • ChinmoyChinmoy Member Posts: 359
    welcome... :)

    please mark the post as solved.
  • krzychub83krzychub83 Member Posts: 120
    Ups. Haven't noticed that this was for the file... Chinmoy is the best way. Sorry for this spam.
Sign In or Register to comment.