Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 29 Mar 2004 @ 22:44:52 GMT


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


Subj:   Re: Float to Timestamp Conversion
 
From:   Maxwell, Donald

If you are on V2R5, you can use ...

SELECT  (((1040315065500 (FLOAT)) (FORMAT '99999999999999') (CHAR(14)))
(TIMESTAMP, FORMAT 'YYYYMMDDHHMISS')) + INTERVAL '1900' YEAR

If the time portion is stored in the decimal fraction portion of the float, you can use (FORMAT '99999999.999999') (CHAR(15)) and (TIMESTAMP, FORMAT 'YYYYMMDD.HHMISS')

If the float contains the full year ( ie. 2004 and not 104 like integer dates ), you can omit the + INTERVAL '1900' YEAR


Donald



     
  <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