老师,帮忙看看下面的代码哪里错误?计算结果为零,不正确
Dim name_fk As String = e.Form.Controls("ComboBox1").text
Dim t1 As Date = e.Form.Controls("DateTimePicker1").value
Dim t2 As Date = e.Form.Controls("DateTimePicker2").value
Dim filter1 As String = cexp("[付款单位]='0}'and [日期] > '{1}' and [日期] <= '{2}'",name_fk ,t1, t2)
Dim filter2 As String = cexp("[付款单位]='0}'and [付款时间] > '{1}' and [付款时间] <= '{2}'",name_fk ,t1, t2)
Dim zfy As Single = DataTables("流水").sqlCompute("sum(税后核定)", filter1)
Dim fk As Single = DataTables("付款流水").SQLCompute("sum(实付金额)", filter2)
e.Form.Controls("TextBox1").text = zfy - fk
t1 2005-01-01 00:00
t2 date.now
上面的代码计算结果是零。 实际不应该是零。
谢谢!