We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [double]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
790 views

Invalid conversion from runtime type String to Double

Background I am getting this error: Invalid conversion from runtime type String to Double On this line of code: line.put(targetField, (Double)fieldValue); The variable fieldValue is of type ...
0
votes
1answer
354 views

Is Scientific notation allowed in double

Apex document clearly says, Scientific notation (e) for Doubles is not supported. But again, Salesforce Object Reference guide says, Values can be stored in scientific notation if the number is large ...
1
vote
1answer
592 views

Convert double to String

I have the following double from salesforce as a number = Latitude = 50.916408140415314 I want to convert it to a string. However when I convert it to a string like this: string.valueof(latitude) i ...
13
votes
3answers
10k views

Decimal or double?

What datatype should I use in Apex Classes when I need to store a number with decimal places. What do you use and why?
0
votes
2answers
682 views

round a value to .0 or .5

I'm looking for a way to round a value to .0 or to .5, so 1,34 would become 1.5, 1.22 would become 1.0, 1.63 would become 1.5, and 1.79 would become 2.0. Is there a function to accomplish ...
3
votes
1answer
654 views

Salesforce API query encountering error with large integer / double

I'm having an issue querying the Salesforce API with a number larger than the max for a 32-bit integer. I don't think it's code-based as the problem is also encountered when using the Salesforce ...
11
votes
1answer
2k views

Converting between .NET decimal and SFDC decimal

We have a .NET app that interfaces with SFDC via a web service. When we import the WSDL the resulting classes will use the .NET type double wherever SFDC entities use a double. The problem I see here ...
7
votes
1answer
2k views

What is max and min range for double.valueOf()?

what is max and min range for double.valueOf() in apex.