If e.Col.name = "出生日期" Then
Dim n As Integer = 6 '未来天数,含今天,所以实际是未来7天
Dim dt As Date = e.Row("出生日期")
Dim dt1 As New Date(Date.Today.Year,dt.Month,dt.Day)
Dim dt2 As New Date(Date.Today.AddDays(n).Year,dt.Month,dt.Day)
If e.Col.Name = "出生日期" Then
If e.Row.IsNull("出生日期") = False
If (dt1 >= Date.Today AndAlso dt1 < Date.Today.AddDays(n)) OrElse (dt2 >= Date.Today AndAlso dt2 < Date.Today.AddDays(n)) Then
e.Style = "生日提醒"
End If
End If
End If
End If