|
如果结果是0:00:00说明还没有退出- Public Function gDATE(id As String, myDate As Date) As Date
- Dim strSQL As String
- Dim rs As New ADODB.Recordset
- On Error GoTo gDATE_Error
- strSQL = "select 退出时间 from 退出时间 where 工号='" & id & "' And 退出时间>#" & myDate _
- & "# order by 退出时间"
- rs.Open strSQL, CurrentProject.Connection, adOpenKeyset, adLockReadOnly
- gDATE = rs.Fields(0)
- rs.Close
- Set rs = Nothing
- On Error GoTo 0
- Exit Function
- gDATE_Error:
- MsgBox "Error " & Err.Number & " (" & Err.Description & ")"
- End Function
复制代码- SELECT 时间汇总.工号, 时间汇总.登录时间, gDATE([工号],[登录时间]) AS 退出时间
- FROM 时间汇总
复制代码
自己看看对不对,我没有核对! |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|