Dim dt As DataTable = DataTables("派单") Dim sd As Date = "2018-01-01" Dim ed As Date = "2018-12-30" Dim d As Date = sd Do While d <= ed If d.DayOfWeek = 3 Then '星期三 Dim ndr = dt.addnew ndr("日期") = d ndr("编号") = "01" ndr("户名") = "张三" End If d = d.AddDays(1) Loop