Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 07 Nov 2010 @ 01:00:15 GMT


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


Subj:   Re: Question on Date Format in Teradata.
 
From:   Lunn, Jonathan

The only way I know of to force a format other than the default on an input statement is by means of a CAST function. The following works on my TD 12:

     CREATE TABLE SomeTable
     (IntCol INTEGER
     ,DateCol   DATE
     , TsCol TIMESTAMP(6))
     PRIMARY INDEX( IntCol)
     ;
     INSERT SomeTable (IntCol, DateCol, TS_Col)
     VALUES (311123
     , '2009-01-08'
     , CAST('01/10/2010 04:16:48.000000'  AS TIMESTAMP(6) FORMAT
     'MM/DD/YYYYBHH.MI.SS.S(6)'))
     ;

HTH,

JL



     
  <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