Обсуждение: (none)

Поиск
Список
Период
Сортировка

(none)

От
Sh A Guru Prasad
Дата:
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

Re: (none)

От
Bruno Wolff III
Дата:
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.

> (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