|
Archives of the TeradataForumMessage Posted: Wed, 07 Sep 2011 @ 07:45:47 GMT
Problem is 25 won't be a valid hour. So you have to substring it and then subtract 6 Here is an example (many different variations of this technique will work. select cast(253042 as decimal(6) format'99:99:99') as time_col ,cast(cast(substring(time_col from 1 for 2 ) as integer) -6 || substring(time_col from 3 for 6) as time(0)) I believe this will work as long as the Hour is between 6 and 30. I hope this helps get you started. Thanks, Robert Diehl
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||