参考代码
Dim t1 As Table = e.Form.Controls("Table5").Table
Dim d As Date = "2016-1-1"
Dim y As Integer = d.Year
Dim w As Integer = d.DayOfWeek '算出今天是星期几
Dim dt1 As Date = d.AddDays(-w) '获取本周的第一天
Dim dt2 As Date = d.AddDays(6 - w) '获取本周的最后一天
vars("cdate") = dt1
Dim d1 As Date = vars("cdate")
t1.filter = "日期 >= #" & d1 & "# and 日期 < #" & d1.AddDays(7) & "#"
Dim str As String = ""
If Date.Today >= d1 AndAlso Date.Today < d1.AddDays(7) Then
str = "本周计划"
ElseIf Date.Today.AddDays(7) >= d1 AndAlso Date.Today.AddDays(7) < d1.AddDays(7) Then
str = "下周计划"
ElseIf Date.Today.AddDays(-7) >= d1 AndAlso Date.Today.AddDays(-7) < d1.AddDays(7) Then
str = "上周计划"
Else
str = "第" & t1.Current("sys_weekofyear") & "周计划"
End If
e.Form.Controls("Label13").Text = str