Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.
Function HrsWorkedAll(BegDate1, EndDate1) As Variant Dim conSQL As ADODB.Connection Dim strSQL As String Dim i As Integer Dim Total As Variant Dim rs As ADODB.Recordset Total = 0 i = 0 Set conSQL = New ADODB.Connection conSQL.Open "Server=THEDUB;DRIVER=SQL Server;Database=WRC;Password=*****;User ID=sales" strSQL = "Select Sum(TimeDiff(TimeClock.TimeIn, TimeClock.TimeOut) AS sum_units" & _ " WHERE DateValue(TimeClock.TimeIn) >= (" & BegDate1 & ")" & _ " AND DateValue(TimeClock.TimeOut) < (" & EndDate1 & ")" Set rs = New ADODB.Recordset rs.Open strSQL, conSQL, adOpenStatic, adLockOptimistic If Not rs.EOF Then HrsWorkedAll = rs.GetRows(-1, 1, "sum_units")(0, 0) Else HrsWorkedAll = 0 End If conSQL.Close
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.