I have selected columns from a database table and want this data with two decimal places only. I have:
SQL.Strings = ('select '#9'my_index '#9'his_index,'...
#9
?I am very new to Delphi.
#9
is the character with code 9, TAB.
If you want to convert a floating point value to a string with 2 decimal places you use one of the formatting functions, e.g. Format()
:
var
d: Double;
s: string;
...
d := Sqrt(2.0);
s := Format('%.2f', [d]);