Subject | Re: [IBO] ... |
---|---|
Author | Daniel Rail |
Post date | 2002-03-15T12:46:04Z |
At 15/03/2002 07:46 AM, you wrote:
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)
> From a normal IB_Edit, setting in IB_Query the Display format, i can haveAn easy way is:
> 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?
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)