Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to convert a big decimal to float but keep running into errors. I have tried the following and it will not work. I get can't convert big decimal to float. Any suggestions?
What is the error you are getting? What is your input data?
Doubles are slightly different than floats in Java. You can just use double all the time safely.
@steeld95 ,the expression you were trying is to convert to double,if you want to convert to float use the below way.
row3.BigDecimalField__c != null ? row3.BigDecimalField__c.floatValue() : null