Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

# Questions tagged [rounding]

The tag has no usage guidance.

12 questions
Filter by
Sorted by
Tagged with
177 views

### Get full length decimal value of a managed field with decimal places set to 2

I have a Managed field Number(16, 2) of which number of decimal places cannot be edited. For Example, if I enter 1.2391276549 into that field, It is displayed as 1.24 (as we know that salesforce ...
76 views

### How To Predict Loss Of Precision For Decimal Operations?

How can I predict loss of precision for decimal operations? For example in the below calculation the result is off by .00000000000002 Should I be rounding after each decimal operation? Decimal d1 =...
320 views

### Rounding of hours to the nearest .25 , .50, .70 and 1 hour

Hello if anyone can help me solve this. I am trying to create a process builder that rounds off decimals to the nearest .25 , .50, .70 and 1 hour. For instance a user would log time at .23 then it ...
4k views

### Round off an apex variable upto two decimal places

I have apex variable in my visualforce page, which is calculated as below - <apex:variable var="cntFinal" value="{!IF(cntVar1==0,0,(cntVar2+cntVar3)*100/cntVar1)}"/> Now, I want to set this ...
849 views

### Round a number with AMPscript

The output for quantity field: %%=v(@Quantity__c)=%% is a decimal number (2.0 for example), how can I round this value with AMPscript to be just (2)?
147 views

### Format and multiply a number without rounding

So I have %%=FormatCurrency( Multiply(@365,339.00,1.5),"en-US",0,"\$" )=%% Which returns \$548,009 The issue with this is that it's rounded the .50 so it now ends in 9 not 8. I've been working on ...
381 views

### Help in Formula

I have a currency formula field called USD Total where the Amount is multiplied by GBP exchange rate. USD TOTAL = Amount * 1.22 I'm trying to create a formula where: I can add "USD" prefix AND The ...
172 views

### Why sales force is rounding up Value?

Why sales force is rounding up Value. I have EnteredLoan Amount (£) 999,999,999,999,999.99. However when i am doing query on Dev. Console it is returning me 1000000000000000. How do i avoid this?
130 views

### Is there any way to maintain a Decimal scale property without rounding for every operation?

Is there a way to maintain the scale of a Decimal across multiple operations? I thought setScale appears to be a normal set method on the Decimal class. Meaning that you can set the scale, and then ...
1k views

### Ceiling Decimal in apex

I want to get the nearest ceiling for the decimal value. For 1268.0 => I want to get 1300. For 2537.0 => I want to get 2500. It would be like Excel function. I used value.round(roundingMode....