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
Priya Verma 23Priya Verma 23 

how to convert decimal number to words

 how to decimal numbers to convert  words 
AbhishekAbhishek (Salesforce Developers) 
Hi Priya,

The following solution helps you to achieve your requirement by splitting the value.

For example, you have value like 1234.12.

Decimal Num = 1234.12; // This is your Number
String strVal = String.ValueOf(Num); // Convert Number to string
List<String> lstNum = strVal.Split(‘.’); // Split number by dot, List size will be two.
String NumberToString = ‘’;
If(lstNum.size()>0){`
            String NumberToString1 = CallYourNumberToStrimgMethod(lstNum[0]);// Get Number to String of before decimal place.
                String NumberToString2 = CallYourNumberToStrimgMethod(lstNum[1]);// Get Number to String of after decimal place.
NumberToString = NumberToString1 + NumberToString2; // here you will get exact out put.
 }

For further reference, you can the below blog too,

https://success.salesforce.com/answers?id=9063A000000e0ItQAI

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks.