Reputation: 4335
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
Upvotes: 1
Views: 4029
Reputation: 60462
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
Upvotes: 3