Subject Re: [firebird-support] formatting numbers
Author Helen Borrie
At 09:55 AM 22/06/2004 +0000, you wrote:
>Hello
>
>I am developing an app using Firebird 1.5, delphi, dbexpress and
>intraweb. This is probably a very easy problem to fix, but how do I
>format numbers with 2 decimal places showing, eg 2.50 shows as 2.5 in
>my clientdatasets or using ISQL. In ORACLE there are various functions
>to format fields such as to_char, to format numbers and dates. Is
>there anything similar in Firebird. Or is there a doc somewhere that
>lists all the functions?

1. In Delphi, use the appropriate Formatxxx function (FormatFloat,
FormatBCD, etc.)

2. Or use a mask.
See the Delphi help for these: it's off-topic here.

3. From the server side you can pass a formatted string by calling an
external formatting function from FreeUDFLib: see f_DollarVal or
f_FixedPoint.

/heLen