标题: 四舍五入的问题 [打印本页] 作者: zx994398 时间: 2008-11-10 10:16 标题: 四舍五入的问题 Option Compare Database
Function myRound(Number As Double, N As Integer) As String
myRound = Format(Int(Number * (10 ^ N) + 0.5) / (10 ^ N), "0." & String(N, "0"))
End Function
Function sswr(Number As Double, DP As Integer) As Double
sswr = Int((Number * 10 ^ DP) + 0.5) / 10 ^ DP
End Function