Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 29 Feb 2008 @ 18:05:35 GMT


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


Subj:   Re: Char to date in teradata
 
From:   Schafer, Michael

Here is a solution for you. It is an invalid date because you aren't specifying the date format of your new date. Hope this helps. Regards,

     select cast(('31-dec-' || cast(cast((current_date (format 'yyyy')
     (char(4))) as int)-1 as char(4))) as date format 'DD-MMM-YYYY')

Mike



     
  <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: 27 Dec 2016