比如,城市的,参考代码
Dim dt As DataTable = DataTables("管理")
For Each dr As DataRow In dt.Select("")
Dim pd_t As Date = dr("派单时间")
Dim fk_t As Date = dr("反馈时间")
Dim s As String = Format(pd_t, "mmss")
Dim flag As Boolean = False
If s >= "07:30" AndAlso s <= "19:00" Then
Dim d As Date = new Date(pd_t.Year, pd_t.Month, pd_t.Day, 21, 0, 0)
If fk_t > d Then
flag = True
End If
ElseIf s > "19:00" Then
Dim d As Date = new Date(pd_t.Year, pd_t.Month, pd_t.Day, 17, 0, 0)
d = d.AddDays(1)
If fk_t > d Then
flag = True
End If
End If
dr("超时任务") = flag
Next