Received: from summersault.com (nollie.summersault.com [208.196.32.199]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3JJqu328895 for ; Thu, 19 Apr 2001 15:52:56 -0400 (EDT) (envelope-from mark@summersault.com) Received: (qmail 85776 invoked from network); 19 Apr 2001 19:52:55 -0000 Received: from hoobella.summersault.com (HELO summersault.com) (208.196.32.195) by nollie.summersault.com with SMTP; 19 Apr 2001 19:52:55 -0000 Message-ID: <3ADF4218.6604D76C@summersault.com> Date: Thu, 19 Apr 2001 14:53:38 -0500 From: Mark Stosberg Reply-To: mark@summersault.com Organization: Summersault X-Mailer: Mozilla 4.77 (Macintosh; U; PPC) X-Accept-Language: en,pdf MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: function to format floats as money? (removing space padding) References: <3ADC61E0.93E7865D@summersault.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/334 X-Sequence-Number: 2692 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/