Y yc-zhj Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #1 我用的变量是currency,后台的数据库是2000,字段的类型是money,计算的结果有4位小数, 请问我怎么样在能保留2位小数了
S sgs125 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #2 round(fieldbyname('a').asfloat*100)/100
C china_delphi Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #4 FormatFloat('000.00',StrToFloat(edit1.text)); 在StrToFloat(edit1.text)要做异常处理; 赏分!
C china_delphi Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #6 money类型可以用Folat类型进行处理;
L luojf999 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #7 ROUND(currency, 2) round()是将结果四舍五入到小数点后指定位数
L lphjj Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-18 #8 在Delphi中ROUND只有一个参数,只有按Round(Curr*100)/100 或者用 FormatFloat(',0.00',StrToFloat(Edit1.Text))