Subject Re: [IBO] Field Properties:Display Format
Author Helen Borrie
At 03:26 PM 19-09-01 +0200, you wrote:
>I can't seem to get my field to display a currency value(double precision)
>in the right format.
>I use %m for display format which I set up in the field properties tab when
>double clicking on ib_query.
>I have also edited the column attribs and checked the currency flag.
>It keeps displaying %d or %m or %8.2m no matter what I put in. Unless I
>understand format strings wrongly I dont know what else I should be doing to
>get the value to display R5.00 or $5.00 or any other currency.

DisplayFormat is like DisplayFormat in the VCL - don't confuse it with an EditMask.

To display 567.891 as currency, you would do something like this:

'R'#0.00 displays R567.89

This would display .566 as R0.57

'R'#.## would display .566 as R.57

and so on...

Always use commas for thousands separators and periods for decimal points. The Windows regional setting will adjust them if appropriate.

All for Open and Open for All
InterBase Developer Initiative ยท