Post Author: ayla1209
CA Forum: Formula
My original question was posted on the old forum, and I did receive a solution that worked at that time, but now I have a new problem...
I have a table that has time stamps for each time a user logs in or out of a system. For each user I need to have it look at the login, find the corresponding logout time, and calculate the difference. I then need to sum this to find a total login time for a given day. The original solution worked fine when the business day ran on a calendar day... unfortunately we are now ending the business day at 4pm.The time stamp is one date/time field, there is a separate field that is either a 0 (for login) or a 2 (for logout). So for example the data might look like this:userID operation eventDate1362 0 12:51:42 PM1362 2 12:52:36 PM1362 2 12:52:40 PM1362 0 1:59:30 PM1362 0 2:41:14 PM1362 2 4:24:02 PM1362 0 4:24:08 PM1362 2 4:25:46 PM1362 0 4:25:58 PM1362 2 4:26:51 PM1362 0 4:28:05 PM1362 2 6:36:12 PM1362 2 6:39:17 PM1362 0 6:40:32 PM1362 2 8:00:13 PMAs long as the first record is a "Login" there is no problem, unfortunately there are times when a user may be actively logged into the system at the 4pm EOD; so for that person I need to force the running total to start at 16:00:00 hours. I cannot seem to figure out how to do it...
I was able to create a formula ("@CorrectedStartTime") to look at the first record and if it is a "Logout" to change the time; but my elapsed time formula currently looks like this:
if {intEventHistory.operation} = 2then DateDiff ("s",Previous({intEventHistory.eventDate}),{intEventHistory.eventDate})
However it will not allow me to use the "prevous" function with my "Corrected Start Time" formula.
Any ideas would be greatly appreciated!!!
Request clarification before answering.
Post Author: ayla1209
CA Forum: Formula
bump (I hate doing that!)
Please, this is becoming a critical issue - does anyone have any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.