我的查询如下
Dim DoneAvgCont As New OleDbCommand("select avg(diffpay) ,conrtname from metersdone",con)
Dim DoneAvgContdb As New OleDbDataAdapter(DoneAvgCont)
Dim DoneAvgContDt As New DataTable
avg(diffpay)列的结果如55.2516494664,我想要舍入到55.25
我使用visual basic.net 2015,我从访问
获取答案 0 :(得分:1)
在第一行编辑您的查询,如下所示
Dim DoneAvgCont As New OleDbCommand("select round(avg(diffpay),2) ,conrtname from metersdone",con)