Covert double to specific decimal

 

Hi i want to convert a double value to a number with two digits. Any ideas please?


For example double x= 2.345326341 should be converted to 2.35


Thanks!

 
x=NormalizeDouble(x,2);
 
Thanks Roger but wont NormalizeDouble(x,2) give a number like 2.35000000 ? I want to display only the first to digits.
 
JT2008 wrote >>
Thanks Roger but wont NormalizeDouble(x,2) give a number like 2.35000000 ? I want to display only the first to digits.

Print(DoubletoStr(x,2));

 
thats it. thanks!
Reason: