A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
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.
|Pivot tables that only has data for one section - how to do it..||4||44|
|Checking references in VBA||3||23|
|Some sheets won't re-calculate unless you stop and step through the code||3||14|
|Count How Many Times Each Number Repeats||14||23|