It's not a bug. The value you're passing into Format has more significant
digits than the double data type can handle, so it's not unreasonable to see
roundoff with values like that. For double-precision variables you get
around fifteen or sixteen significant digits, depending on the value. If you
need more significant digits, use the Decimal type, which has (I think)
twenty-seven significant digits.
Tom Dacon
Dacon Software Consulting
"RD" <no****@nospam.net> wrote in message
news:Ow**************@TK2MSFTNGP10.phx.gbl...
The statements
The value passed to Amount by the function call is 111111111111111.98 and
is
a double
then we 4execute the following code snippet
Dim New_amt as string
New_amt = Format(amount, "000000000000000.00")
The new_amt value returned is
"111111111111112.00"
Which is wrong.
Does any one know why and how to work around thisÉ
Thanks
Bob