Hi all,
I have this report I need to create which at the end will give the average time users spent on the site.
The problem is that there is no Logout in the log, so the only way to know the time spent on the site is by calculating the gap between the login time and the last action time prior to the next login.
The problem is finding the Login and the last action connected to it.
I have tried some ways but with no luck.
To help you help me I have copied some data out of the DB.
What I need to get is the gap between the raw with prod = 0 and the last raw where prod <> 0 and it's ID is smaller then the next login's (Prod = 0) Id.
I'm useing CR 9 with ASP on W2K
Id Comp User Prod date
------- ------- ------ ------ --------------------
2067957 1 18 0 04/12/2003 09:17:23
2067979 1 18 50 04/12/2003 09:19:11
2068014 1 18 2 04/12/2003 09:21:17
2068077 1 18 50 04/12/2003 09:25:49
2068118 1 18 50 04/12/2003 09:28:50
2071003 1 18 0 04/12/2003 13:33:58
2071013 1 18 50 04/12/2003 13:34:37
2071015 1 18 1 04/12/2003 13:34:52
2071031 1 18 53 04/12/2003 13:36:20
I have this report I need to create which at the end will give the average time users spent on the site.
The problem is that there is no Logout in the log, so the only way to know the time spent on the site is by calculating the gap between the login time and the last action time prior to the next login.
The problem is finding the Login and the last action connected to it.
I have tried some ways but with no luck.
To help you help me I have copied some data out of the DB.
What I need to get is the gap between the raw with prod = 0 and the last raw where prod <> 0 and it's ID is smaller then the next login's (Prod = 0) Id.
I'm useing CR 9 with ASP on W2K
Id Comp User Prod date
------- ------- ------ ------ --------------------
2067957 1 18 0 04/12/2003 09:17:23
2067979 1 18 50 04/12/2003 09:19:11
2068014 1 18 2 04/12/2003 09:21:17
2068077 1 18 50 04/12/2003 09:25:49
2068118 1 18 50 04/12/2003 09:28:50
2071003 1 18 0 04/12/2003 13:33:58
2071013 1 18 50 04/12/2003 13:34:37
2071015 1 18 1 04/12/2003 13:34:52
2071031 1 18 53 04/12/2003 13:36:20