Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 07 Jun 2004 @ 08:34:47 GMT


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


Subj:   Re: Formatting string to DATE
 
From:   Dieter Noeth

Hi Vidya,

  I have problem in formatting String type to Date for eg . my input string '06/05/2004' should be format to 'YYYY-MM-DD' ie (2004-06- 05').  


You have to specify the format to convert your input string to a date and a second format to convert it back to a string:

Date:

     select '06/05/2004' (date, format 'mm/dd/yyyy') (format 'yyyy-mm-dd');

Char(10):

     select '06/05/2004' (date, format 'mm/dd/yyyy') (format 'yyyy-mm-dd')
     (char(10));

Dieter



     
  <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