Archives of the TeradataForum
Message Posted: Thu, 04 Jan 2007 @ 17:23:33 GMT
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
|