Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 29 Jan 2008 @ 21:30:25 GMT


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


Subj:   Re: Convert time from twenty four hour to twelve hour format
 
From:   Pugliesi, Anthony J

I stand corrected. If you have a time(6) field it can be converted like you tried to. See example below:

     Request Text

     CREATE SET TABLE adhoc.time_test ,NO FALLBACK ,
          NO BEFORE JOURNAL,
          NO AFTER JOURNAL,
          CHECKSUM = DEFAULT
          (
           time_now TIME(6))
     PRIMARY INDEX ( time_now );


     Sel
     time_now,
     time_now (format 'hh:mi:ssbt')(char(11))  time_conv
     ,type(time_conv)
     from adhoc.time_test


     time_now      time_conv   Type(time_conv)
     13:23:56.000000   01:23:56 PM   CHAR(11)
     10:16:48.000000   10:16:48 AM   CHAR(11)

Tony



     
  <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