function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Test999999Test999999 

Help with Invalid Double error message

I have a history table that tracks changes to a percent field.  If I try to read the history table and convert the NewValue field with :

 

mydouble = double.valueof(h.NewValue);

 

I get the following error message:

 

09:20:52.384|METHOD_ENTRY|[84]|Double.valueOf(Object)
09:20:52.385|EXCEPTION_THROWN|[84]|System.TypeException: Invalid double: 34.98564317560156

 

Why is that value not a valid double ?

 

Thanks,

 

Bill

dmchengdmcheng

Does it work if you convert to a string or decimal instead?

prageethprageeth

I also have seen this 'Invalid Double error message'.

I don't know the reason for this error. However you may use "mydouble = (Double)(h.NewValue);" syntax to avoid this problem.