ToWords function for different languages
Hi,
I went through previous threads for searching on ToWords function for different currencies,
what about for given us an overload function that has extra 2 parameters to take the integer side prefix like "Dollar" and fraction side prefix like "cents".
I went through previous threads for searching on ToWords function for different currencies,
what about for given us an overload function that has extra 2 parameters to take the integer side prefix like "Dollar" and fraction side prefix like "cents".
Comments
You can use the following expression:
ToWords(100.24, "dollar", "dollars") + (Round(100.24 * 100) % 100).ToString() + " cents"
will give you "One hundred dollars 24 cents".
i checked this function absolutely the best but i want to know that how can i do it for Kuwaiti Dinars
Problem 1st :- in kuwait there are 3Decimals not 2
Problem 2nd:- How can i use "Kuwaiti Dinars" instead of "US DOLLARS" and "FILS" Instead of "Cents"
i hope u have solution for sure
wait to hear from u soon
with regards
ToWords(100.245, "dinar", "dinars") + (Round(100.245 * 1000) % 1000).ToString() + " fils"
but where should i keep this text to get result ??
when i am keeping it to text i am getting error or the same thing
One hundred dinars 245 fils
i need like this
One hundred dinars AND Two Hundred Forty Five fils
hows that ?
just last and final question
when report script is c# this line is working
but i use vb as script so what whould i keep instead of this ??
ToWords(100.245, "dinar", "dinars") + "AND " + ToWords(Round(100.245 * 1000) Mod 1000, "fil", "fils")
you can do in any currency with following function.
i give you example with INDIAN currency.
[Replace(Replace(ToWords(125.60),"dollars","rupees"),"cent","paise")]
Output:
One hundred and twenty-five rupees and 60 paise