帮助上的按年月日生成用的是SQL的语句如下
Dim cmd As New SQLCommandDim dt As DataTablecmd.CommandText = "SELECT DISTINCT Year(日期) As 年, Month(日期) As 月, 产品 From {订单}"dt = cmd.ExecuteReader()Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")trv.BuildTree(dt, "年|月|产品")
但我用的是内部数据源,不知道如何转换,求大神门帮忙