Re: remove $ from money field

From: Arguile <arguile(at)lucentstudios(dot)com>
To: Robby Russell <rrussell(at)commandprompt(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: remove $ from money field
Date: 2003-08-09 00:35:00
Message-ID: 1060389301.2834.21266.camel@broadswd
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2003-08-08 at 20:04, Robby Russell wrote:
> Should be a simple question.
>
> When selecting a field that is of type money, how can I remove the $
> when selected?
>
> example: $10.00 would return as 10.00

money as a datatype is deprecated, use numeric(9,2) instead (or whatever
precision you need).

Datatypes:
http://developer.postgresql.org/docs/postgres/datatype-money.html
http://developer.postgresql.org/docs/postgres/datatype.html#DATATYPE-NUMERIC-DECIMAL

Formatting:
http://developer.postgresql.org/docs/postgres/functions-formatting.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2003-08-09 00:39:46 Random via Subselect or Temporary Table
Previous Message culley harrelson 2003-08-09 00:31:25 Re: 7.3.3 behaving differently on OS X 10.2.6 and FreeBSD 4.8-STABLE