Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 02 Oct 2004 @ 08:53:01 GMT


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


Subj:   Re: Adding two time columns
 
From:   Vidyasagar_Nagarajan

Hi Anomy,

First extract Hour (Hr), Second (Sec) and Minute (Min) from Time1 (T1) and Time2 (T2) and add them T1Hr+T2Hr, T1Min+T2Min, T1Sec+T2Sec

Divide (T1Sec+T2sec) with 60. Quotient will be result sec and remainder should be added to (T1Min+T2Min)

Divide (T1Min+T2Min) with 60. Quotient will be result min and remainder should be added to (T1Hr+T2Hr)

Divide (T1Hr+T2Hr) with 24. Quotient will be result Hr and remainder should be added to Date


At last concat your resultHr, resultMin and resultSec

This will work fine


Regards,

Vidya Sagar.N



     
  <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