Subject Re: [IBO] ...
Author Daniel Rail
At 15/03/2002 07:46 AM, you wrote:
> From a normal IB_Edit, setting in IB_Query the Display format, i can have
> for example 1,23.
>
>But, if i want to get the number thorugh a FIELBYNAME property, i can get
>only the correct number 1,234. (And it is correct of course).
>
>If i want to have through FieldByName , instead of 1,234 , the same result
>as in IB_Edit, how can i manage?

An easy way is:

Result:= StrToFloat(FormatFloat('######.##', FieldByName(FieldName).AsFloat));

FormatFloat transforms the value to a 2 decimal value in a string with
rounding and then the StrToFloat converts the resulting string to a Float
value. There might be other ways to do it too. You'll simply have to do
some research to find other approaches. This approach works for me,
because speed in this circumstance is not needed in my apps.

Hope this helps get started.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)