Page 1 of 1

tocurrencywords to convert amount to words

Posted: Thu Jan 15, 2015 12:18 am
by mihiri2
Hi,

I am in SS 2014.3 version and would like to know if the following is possible and if so how to achieve it.

example amount = BHD 1234.456

Should be converted to "One thousand two hundred and thirty four & 456/1000 Only"

I did try ToCurrencyWords(1234.456, true, true, "Dinnar/Dinnar","Fills/Fills") and then it gets converted as "ONE THOUSAND TWO HUNDRED AND THIRTY-FOUR DINNAR AND FORTY-FIVE FILLS"

Thanks

Re: tocurrencywords to convert amount to words

Posted: Thu Jan 15, 2015 10:37 am
by Ivan
Hello,

Please try to use the following expression:

Code: Select all

{ToWords((int)var) + " & " + Math.Round((var - (int)var) * 1000, 0) + "/1000 Only"}
where var is your value, for example variable or datasource field.

Thank you.

Re: tocurrencywords to convert amount to words

Posted: Thu Jan 15, 2015 11:34 pm
by mihiri2
Thanks Ivan, it did work.

Re: tocurrencywords to convert amount to words

Posted: Fri Jan 16, 2015 4:30 am
by Andrew
Great!

Have a nice day!