Archives of the TeradataForum
Message Posted: Thu, 21 Dec 2006 @ 19:45:19 GMT
Subj: | | Re: Converting Time to seconds |
|
From: | | Michael Larkins |
A really good place to start is always the documentation in the form of a reference manual or book on the topic. BTW (by the way): 00:01:20
is not a time, it is an interval of 1 minute and 20 seconds to arrive at the 80 seconds that you suggest.
Since you chose the shortcut:
sel cast((interval '00:01:20' hour to second)
as interval second(2,0))
If you haven't figured it out, the first interval in the cast is normally a column. The second interval is of course the new data type,
or in this case the interval. If you were to read about second as an interval like a portion of time or time stamp, it can include up to 4
digits to the left of the decimal point and 6 to the right. My example for you has a total of two to the left and 0 to the right.
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|