Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 14 Jan 2008 @ 11:11:54 GMT


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


Subj:   Convert time from twenty four hour to twelve hour format
 
From:   Soumya Smita

Hi,

To convert a time field from 24 hour format to 12 hour format (with AM/PM), I am using the below casting operation:

     Sel cast(cast(HALF_HR_STRT_TM as format 'HH:MI:SSBT') as varchar(10))
       from table
       where the column HALF_HR_STRT_TM  is of type time with data like 23:45:33

But I am getting error:3527:Format string 'HH:MI:SSBT has combination of numeric character and graphic values.

Please let me know if the cast function format is incorrect or what other function can be used to achieve this conversion.


Thanks in anticipation,

Smita



     
  <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