Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 05 May 2006 @ 12:48:47 GMT


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


Subj:   Re: The duration of the backup
 
From:   Frank O Connor

Hi

If you have the start date, start time, end date and end time, you could try something like below (or a variant):

     select
     (date-1 ) || ' ' || ('13:00:00' ) (timestamp(0)) (named strt)

     , current_timestamp (timestamp, format 'yyyy-mm-ddbhh:mi:ss') (named now)
     , (now-strt) day(4) to second as elapsed_time
     , (extract(day from elapsed_time) * 24* 60)
     + (extract(hour from elapsed_time) *  3660)
     + (extract(minute from elapsed_time) * 60)
     + (extract(second from elapsed_time)) as elapsed_seconds

Hope this helps

Frank



     
  <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