Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 11 Jan 2006 @ 22:23:58 GMT


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


Subj:   Re: Date manipulation - Timestamp in WHERE clause
 
From:   Calkins, Dennis

Look at the section in the

SQL Reference -- Data Types and Literals

Manual....

     Sel current_timestamp as mytimestamp,
     Cast ( (mytimestamp - interval '2' day ) as date),
     Cast ( (mytimestamp - interval '20' Hour ) as date);

      *** Query completed. One row found. 3 columns returned.
      *** Total elapsed time was 2 seconds.

                          mytimestamp  (mytimestamp- 2)  (mytimestamp- 20)
     --------------------------------  ----------------  -----------------
     2006-01-11 14:18:56.020000+00:00          06/01/09           06/01/10

      BTEQ -- Enter your DBC/SQL request or BTEQ command:


     
  <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