Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 28 Aug 2016 @ 19:38:00 GMT


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


Subj:   Re: Timestamp conversion to timestamp(0)
 
From:   Johnpaul J

Thank you Sherwin, Danny and Vinay!

There was some date format issue. Finally I have used below syntax

     CAST( CAST(trim(
     case when position( ' ' in (substring(start_datetime FROM POSITION(':' IN
     start_datetime)-3) )) =2 then
     SUBSTRING(start_datetime FROM 1 FOR POSITION(':' IN start_datetime)-3)||'
     0'|| SUBSTRING(start_datetime FROM POSITION(':' IN start_datetime)-1) else
     start_datetime end
     )AS timestamp(0) FORMAT 'MM-DD-YYYYBHH:MI:SSBT') AS timestamp(0)  FORMAT
     'YYYY-MM-DDBHH:MI:SSBT')

Regards,

John



     
  <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