Archives of the TeradataForum
Message Posted: Mon, 14 Jan 2008 @ 11:11:54 GMT
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,
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|