For Each lx As String In DataTables("订单").GetValues("类型") Dim max As Date max = DataTables("订单").Compute("Max(订单日期)", "类型 = '" & lx & "'") Dim t As TimeSpan = Date.Now - max Dim d = math.Floor(t.TotalDays) For i As Integer = 1 To d Output.Show(lx & " " & max.AddDays(i)) Next Next