Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 07 Sep 2006 @ 19:11:28 GMT


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


Subj:   Re: How to FORMAT date
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, September 07, 2006 15:09 -->

     SELECT      extract(year
     FROM   column_name)||
                     CASE
                             WHEN   TRIM(extract(month
     FROM   column_name)) <10 THEN '0'||TRIM(extract(month
     FROM   column_name))
                             ELSE    TRIM(extract(month
     FROM   column_name))
                     END
     ||
                     CASE
                             WHEN   TRIM(extract(day
     FROM   column_name)) <10 THEN '0'||TRIM(extract(day
     FROM   column_name))
                     END      AS new_date
     FROM   table_name


     
  <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