I am trying to convert a double with 12 decimal places to a string, but it only returns a string with 10 decimal places.
I have tried ToString
, Format, FormatNumber, CStr and System.Convert.ToString
. They all return 10 decimal places.
(Also same behavior with the decimal data type)
Example:
d = Date.Parse(sDate).ToOADate (value is 41261.001388888886)
d.ToString = 41261.0013888889
CStr(d) = 41261.0013888889
FormatNumber(d, 12) = 41,261.001388888900
In the case of Format
and FormatNumber
, when 12 places are specified, the value is rounded of to 10 digits.
This cropped up when I constructed a Filter for a DataView
object.
Is there a way around this or is this a limitation in .Net
?