Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select datepart(month,入库日期) from cplk where isdate(入库日期)=1", con, 1, 3
Set DataGrid1.DataSource = rs
数据库是ACCESS
入库日期这一列明明就有数据的..不知道是为什么
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select datepart(m,入库日期) from cplk where isdate(入库日期)=1", con, 1, 3
Set DataGrid1.DataSource = rs
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select datepart(m,入库日期) 月份 from cplk where isdate(入库日期)=1", con, 1, 3
Set DataGrid1.DataSource = rs