Link to home
Start Free TrialLog in
Avatar of enrique_aeo
enrique_aeo

asked on

convert decimal numbers to letters

Hi experts, I need to do a function in the database to convert decimal numbers to letters, for example:
1.11
12.78
the integers can range from 1 to 20
the decimal part can range from 1-99
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Hello enrique_aeo,

Please explain what you mean by "convert decimal numbers to letters".

Do you perhaps mean "twelve and seventy-eight one-hundredths", or do you mean something else?

Regards,

Patrick
Or "doce con setenta y ocho"

:)
Avatar of enrique_aeo
enrique_aeo

ASKER

ok, would be something like
12.40 = doce y cuarenta centesimas
15.30 = quince y treinta centesimas
7.30   = siete y treinta centesimas
15.46 = quince y cuarenta y seis centésimas
11.4 = 11.40 = once y cuarenta decimas

the integer part can range from 1-20.
The decimal portion can range from 1-49
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
P.S.  Make sure you get one for "Real Academia" Spanish and not Latin American Spanish.

:)
ok, I will apply the exact specifications, because I'm not sure and will again ask the question
Here is one example of converting a number to Spanish:
http://www.portalfox.com/index.php?name=News&file=article&sid=417&mode=nested&order=0&thold=0

It does not fully meets your requirements as it uses the US style for cents as in "CON 78/100" as opposed to your need for "y 78 centésimas" and uses all caps, but it should not be too difficult to modify.