Subject | Re: [firebird-support] Re: how do you format currency in firebird |
---|---|
Author | Milan Babuskov |
Post date | 2003-08-25T14:49:26Z |
dixonepperson wrote:
1. Use some UDF
2. multiple value by 100, cast as integer, cast that as char, insert
decimal point at 3rd place from the end of string. This would look
"very" ugly, and still need some string UDFs, but it would work
I still don't understand what would you do with such string values?
Since your're using Delphi, perhaps there is a way to do it. AFAIK,
currency datatype of Delphi is the same as BCD datatype, so you should
just set your client library to use BCD types instead of floating point
numbers. AFAIR, this is the way it worked with BDE, but I don't know of
other tools...
--
Milan.
> Well, I don't guess we can do it. He uses CONVERT(NUMERICFIELD ASWell, if you really need it, you can do it. I can think of these two ways:
> CURRENCY) We could do it with CAST, but we don't have the currency
> datatype and numeric nor decimal are fixed length. Maybe this should
> be put on the wish list.
1. Use some UDF
2. multiple value by 100, cast as integer, cast that as char, insert
decimal point at 3rd place from the end of string. This would look
"very" ugly, and still need some string UDFs, but it would work
I still don't understand what would you do with such string values?
Since your're using Delphi, perhaps there is a way to do it. AFAIK,
currency datatype of Delphi is the same as BCD datatype, so you should
just set your client library to use BCD types instead of floating point
numbers. AFAIR, this is the way it worked with BDE, but I don't know of
other tools...
--
Milan.