Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 08 Feb 2011 @ 13:39:55 GMT


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


Subj:   Re: Converting TIMESTAMP to DATE
 
From:   Sarvesh Tewari

Hi John,

You can try this

     sel CAST((EXTRACT (YEAR FROM CURRENT_TIMESTAMP(0)))||TRIM((EXTRACT (MONTH FROM
     CURRENT_TIMESTAMP(0))) (format '99'))||TRIM((EXTRACT (DAY FROM CURRENT_TIMESTAMP(0)))
     (format '99')) AS DATE FORMAT 'yyyy mmdd' );

      *** Query completed. One row found. One column returned.
      *** Total elapsed time was 1 second.

     ((EXTRACT(YEAR FROM Current TimeStamp(0))||Trim(BOTH FROM EX
     ------------------------------------------------------------
                                                         20110208

Here instead of CURRENT_TIMESTAMP(0) you can use your variable


Thanks,

Sarvesh Tewari



     
  <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