Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 01 Nov 2001 @ 19:24:29 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: User activity monitor
 
From:   David Wellman

Tom,

I think you'll find that the approach I outlined works even for sessions which cross the date boundary.

Towards the end of my explanation I included a bit which caters explicitly for sessions logging on one day 1 and logging off on day 2.

Assume you had a session which logs on at 23:50:00 and logs off at 00:10:00 the following day. Using my approach the calculation using the time elements come out ot a fairly large negative value (-85200). However, when you include the date subtraction this adds on a value of 86400 (number of seconds in a day) so your final answer comes to +1200 which converts to 20 minutes (which is the duration of this session).

Does that answer your question?


Cheers,

Dave

Ward Analytics Ltd: Information in motion (www.ward-analytics.com)



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023