# Convert decimal values to english text

• May 8th, 2012, 04:47 PM
tqa
Convert decimal values to english text
Hi
I'm looking for a method that could translate decimal values to string,english text. For example currency values.
600.50 so it should read as "six hundred and 50".
Most of the method that I found can only read for integer.
Can anyone give me an idea or suggestion how can I do this?
Thank you
• May 8th, 2012, 05:26 PM
Norm
Re: Convert decimal values to english text
How would you say: 600.051?

You could cast a double to int to get the 600.
How may decimal places do you want to handle?
• May 8th, 2012, 05:29 PM
copeg
Re: Convert decimal values to english text
• May 8th, 2012, 10:39 PM
tqa
Re: Convert decimal values to english text
Quote:

Originally Posted by Norm
How would you say: 600.051?

You could cast a double to int to get the 600.
How may decimal places do you want to handle?

I only want to handle two decimal place because i'm using this for converting currency. It would be six hundred and fifty one.
By the way,I found a solution using java.text.DecimalFormat.
Thank you for you help,I really appreciate it.
• May 9th, 2012, 11:15 PM
Junky
Re: Convert decimal values to english text
Quote:

Originally Posted by tqa
600.50 so it should read as "six hundred and 50".

What about 624.50? Would that be six hundred and twenty four and fifty?
• May 10th, 2012, 03:20 AM
tqa
Re: Convert decimal values to english text
As I want to use it for currency, so I would like it to be six hundred and twenty four dollar and fifty sent.