P
Phil Mc
OK this should be bread and butter, easy to do, but I seem to be going
around in circles and not getting any answer to achieving this simple
task.
I have numbers in string format (they are coming in from an excel
sheet):
Examples.
45,666.0041
5664456.12
-5465.25568 ETC
I need to format this into a specified number of decimal places without
affecting anything else.
When I require 2 decimal places, this seams to work:
this.plotPoint =
float.Parse(String.Format("{0:F2}",row[fundReturnColumn]));
BUT when I want 4 decmail places:
this.plotPoint =
float.Parse(String.Format("{0:F4}",row[fundReturnColumn]));
I still get 2??????
I am sure that there is a simple explanation, but its driving me mad.}
around in circles and not getting any answer to achieving this simple
task.
I have numbers in string format (they are coming in from an excel
sheet):
Examples.
45,666.0041
5664456.12
-5465.25568 ETC
I need to format this into a specified number of decimal places without
affecting anything else.
When I require 2 decimal places, this seams to work:
this.plotPoint =
float.Parse(String.Format("{0:F2}",row[fundReturnColumn]));
BUT when I want 4 decmail places:
this.plotPoint =
float.Parse(String.Format("{0:F4}",row[fundReturnColumn]));
I still get 2??????
I am sure that there is a simple explanation, but its driving me mad.}