Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 01 Nov 2001 @ 18:35:25 GMT


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


Subj:   Re: User activity monitor
 
From:   David Wellman

Al,

As you say, it's not easy given the way Teradata stores times.

One way is to EXTRACT each component of the time fields, subtract the starting time from the ending time and then convert to seconds (or minutes if that's good enough) and then add the results together - i.e. (ending Hour - starting Hour) * 3600 + (ending Minute - starting Minute) * 60 + (ending Second - starting Second).

The change in days is easy to handle, use "(ending Date - starting Date) * 86400" and then add it to the answers from above.

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