Foxtable(狐表)用户栏目专家坐堂 → [求助]


  共有3915人关注过本帖树形打印复制链接

主题:[求助]

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/1/22 14:03:00 [显示全部帖子]

Dim nms As String
Dim n As Integer = 6 '未来天数,含今天,所以实际是未来7天
For Each dr As DataRow In DataTables("对私客户明细").DataRows
    Dim dt As Date = dr("生日")
    Dim dt1 As Date
    Dim dt2 As Date
    If dt.Month = 2 AndAlso dt.Day = 29 Then
        dt1 = New Date(Date.Today.Year,dt.Month,28)
        dt2 = New Date(Date.Today.AddDays(n).Year,dt.Month,28)
    Else
        dt1 = New Date(Date.Today.Year,dt.Month,dt.Day)
        dt2 = New Date(Date.Today.AddDays(n).Year,dt.Month,dt.Day)
    End If
   
    If (dt1 >= Date.Today AndAlso dt1 < Date.Today.AddDays(n)) OrElse (dt2 >= Date.Today AndAlso dt2 < Date.Today.AddDays(n)) Then
        nms = nms & ",'" & dr("身份证号") & "'"
    End If
Next
If nms > "" Then
    nms = nms.Trim(",")
    Tables("对私客户明细").filter = "[身份证号] In (" & nms &")"
End If

 回到顶部