问题
I have a decimal(6,2) field storing data in seconds.
I want those seconds to be converted in to HH:MM:SS.
For ex: '19,500' seconds should be shown as 05:25:00
回答1:
Assuming that the datatype is a typo (you can't store 19500 in a decimal(6,2)):
col * INTERVAL '00:00:01' HOUR TO SECOND -- no fractional seconds
col * INTERVAL '00:00:01.00' HOUR TO SECOND -- fractional seconds
来源:https://stackoverflow.com/questions/38521268/convert-seconds-to-hhmmss-in-teradata