本帖最后由 yu2n 于 2015-11-28 14:18 编辑
楼上,我也做了VBS版本的…-
- ' ' '
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 06:00:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 08:15:00") & "')"
- objRS2.Fields("上班1") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 11:11:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 12:30:00") & "')"
- objRS2.Fields("下班1") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 14:00:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 15:00:00") & "')"
- objRS2.Fields("上班2") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 16:10:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 18:10:00") & "')"
- objRS2.Fields("下班2") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 18:30:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 19:10:00") & "')"
- objRS2.Fields("上班3") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- strSQL = "Select `打卡时间` From [" & GetFileNameEx(dbSource, "FN") & "] Where `姓名`='" & objRS2.Fields("姓名") & "' And " & _
- "`打卡时间`>=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 21:00:00") & "') And " & _
- "`打卡时间`<=CDate('" & StringToDate(objRS2.Fields("打卡日期") & " 22:00:00") & "')"
- objRS2.Fields("下班3") = StringToDate(RunSQLReturnString(objConn1, strSQL))
-
- ' ' '
复制代码 就想问问,现在还能领红包么…
|