[DUG] Need help in format function
Vikas...
vikas.image at gmail.com
Wed Mar 3 19:30:24 NZDT 2010
Dear All,
hope all doing great.
I am experiencing a small problem in format function.
Basically what i am trying to do is i want to display a float value with
respect to decimal places. I explain with example.
We have a banking application where tax calculation happens.
Now let say we have value 123.456, so when client specifies 2 decimal it
shound show up
123.45.
I have tried the format function and floattostrF it dint work it shows up as
123.46 in other words it rounds up, which is very crtiical since.01 value
makes huge impact in tax calculation.
FloatToStrF(eTemp,ffNumber,sizeof(eTemp),2)
here etemp =123.4567
I have tried this, but no luck. Anyone have any idea
Hower i know the work arround like taking the decimal position and deleting
it. But it is not right way to do it i belive
Appreciate your help
thanks
--
vikas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100303/5967c750/attachment-0001.html
More information about the Delphi
mailing list