Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Jan 2007 @ 17:23:33 GMT


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


Subj:   Re: Casting integer as Time
 
From:   Michael Larkins

     > CAST(CAST(CAST(TRANS_TIME AS FORMAT '99:99:99') AS CHAR(8)) AS TIME(0))

It has been pretty interesting with many of the casting examples that have been posted that CAST casted and formatted data. Why? Is it really necessary to do something the long way? I (like Fred) like a simple approach.

Try this:

     sel cast(213025 as time(0)) as "time";

     time
     --------
     21:30:25

Keep it simple is a pretty good rule too.


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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