From: Mark Stosberg <mark@summersault.com>
To: pgsql-sql@postgresql.org
Subject: Re: function to format floats as money? (removing space padding)
Date: Thu, 19 Apr 2001 14:53:38 -0500
Message-ID: <3ADF4218.6604D76C@summersault.com> (raw)
References: <Pine.LNX.4.30.0104171724230.762-100000@peter.localdomain>
<3ADC61E0.93E7865D@summersault.com>
Now that I've figured out that numeric is good for storing money, and
that I can format with like this:
to_char(price, '9,999,999.99') as price
Then I discovered that sometimes this returns leading spaces I don't
want. I can get rid of them like this:
trim(to_char(price, '9,999,999.99')) as price
Is that the recommended money formatting style, for amounts less than
9,999,999.99? (assuming I'll tack on my own currency symbol? ). Other
there other general styles that folks like for this? Thanks,
-mark
personal website } Summersault Website Development
http://mark.stosberg.com/ { http://www.summersault.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mark@summersault.com
Subject: Re: function to format floats as money? (removing space padding)
In-Reply-To: <3ADF4218.6604D76C@summersault.com>
References: <Pine.LNX.4.30.0104171724230.762-100000@peter.localdomain> <3ADC61E0.93E7865D@summersault.com> <3ADF4218.6604D76C@summersault.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox