Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

??elapsed Time datediff()??

Status
Not open for further replies.

ConfusedNAccess

Technical User
Jul 7, 2006
54
CA
I have a table with the following fields:

CreateDate--Date/Time (ex.9/19/06 9:17:00 am)

LogType-- Number --1-6 (1shows logon 3 save 6 log off)

Description--Text (description of action taken)

UserName--Text

UserID--Text

ReportID---number-- shows the ID of each report

TS--Date/Time (ex.9/19/06 9:17:35 am)

This log shows actions performed in the database, each time a user logs in, opens, saves, deletes, logsout, it captures the action with 2 time stamps.. the first being the create date which doesn't show seconds, and then the TS which shows the exact time.

I'm having a difficult time writing a query to calcuate the elapsed time in a working day, spent on each report, for each user.

this is a usage log so there is quite a bit of data.

ex. data


(user) John Doe (createdate)9/19/2006 10:05:00am (logType) 3 (description) savedworksheet (TS) 9/19/2006 10:05:35am


I've tried to format each date field to separate the date and the time.. have 4 fields.. start date end date start time end time.. and then use datediff( but it's not working..

please help
 
no need to separate the date and time, the datediff takes whole datetime datatypes, read the F1 for datediff to find out how to display the results

--------------------
Procrastinate Now!
 
but if the log in really doesn't have the time, you'll never get any useful results

also, note that you need a tag to determine if it is a lon-in or log-out, otherwise you will surely get it wrong for the (numerous) occasions where the 'log-out' was just a crash (leaving no record of hte actual log-out)

thne, you will need to decide (or be told) how to handle these unary events.



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top