以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  查询最大值  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=62002)

--  作者:sdscen
--  发布时间:2014/12/23 21:21:00
--  查询最大值
在代码中如何筛选表中最大日期的数据行
--  作者:有点甜
--  发布时间:2014/12/23 21:29:00
--  

 Dim max As Date = Tables("表A").Compute("Max(日期)")

 msgbox(max)


--  作者:有点甜
--  发布时间:2014/12/23 21:30:00
--  

或者

 

Dim fdr As DataRow = DataTables("表A").Find("", "日期 desc")

msgbox(fdr("日期"))