Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Log time against a job

Hello, I would like to create a time logging system.

Basically what I need to do is import Job numbers from a sql db into a
separate worksheet, I can use vlookups for the job numbers for us to
lookup specific lobs. This part I can do.

What I need to do is to be able to log time against that job number
(there must be a timer that records when you have pressed the start
and stop etc). They select the job number and the timer starts until
we stop it. The value must be held somewhere so that we can report on
it.

The time must be stored so that we can run a report to calc total time
spent against the job.

Any help would be greatly appreciated.

Regards,
Byron

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Log time against a job

I think you can use SQL-DMO Job.EnumHistory method to get what you want. One
of the return valuse is "run_duration". It looks something like this:

Dim SQLSrv As New SQLDMO.SQLServer
Dim q As QueryResults

SQLSrv.Connect "ServerName", "Login", "Password"

For Each jb In SQLSrv.JobServer.Jobs
Debug.Print jb.Name
Set q = jb.EnumHistory
For j = 1 To q.Columns
Debug.Print "(" & j & ") " _
& q.ColumnName(j) & " " _
& q.GetColumnString(1, j)
Next
Next

--
urkec


" wrote:

Hello, I would like to create a time logging system.

Basically what I need to do is import Job numbers from a sql db into a
separate worksheet, I can use vlookups for the job numbers for us to
lookup specific lobs. This part I can do.

What I need to do is to be able to log time against that job number
(there must be a timer that records when you have pressed the start
and stop etc). They select the job number and the timer starts until
we stop it. The value must be held somewhere so that we can report on
it.

The time must be stored so that we can run a report to calc total time
spent against the job.

Any help would be greatly appreciated.

Regards,
Byron


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time calculations for Scheduled Time vs. Actual Time Worked The Caterer Excel Discussion (Misc queries) 1 November 29th 09 08:08 AM
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"