(none)

Started by Sh A Guru Prasadover 22 years ago2 messagesbugs
Jump to latest
#1Sh A Guru Prasad
guru@ap.nic.in

Hi, How to convert number format (with decimal) into
integer only ex:to conver 100.00 to 100.
One more
Do we have any code to convert number to words
ex: 1234 to one thousand two hundredn and thirty four.
(I want to use for indian currency only, i will use crores
instead of billions)

Thank you

#2Bruno Wolff III
bruno@wolff.to
In reply to: Sh A Guru Prasad (#1)
Re: (none)

On Tue, Dec 30, 2003 at 19:32:03 +0530,
Sh A Guru Prasad <guru@ap.nic.in> wrote:

Hi, How to convert number format (with decimal) into
integer only ex:to conver 100.00 to 100.

Depending on what kind of rounding you want, you can just cast to
an integer. You could also use ceil, floor or round.

One more
Do we have any code to convert number to words
ex: 1234 to one thousand two hundredn and thirty four.

I don't think there is currently a supplied function to do this. You
will need to write your own.

Show quoted text

(I want to use for indian currency only, i will use crores
instead of billions)

Thank you

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly