Converting time duration(in seconds) to hh:mm:ss
Hi,
I have a requirement of converting a process time duration(in seconds) into hh:mm:ss format..
For this i need to make three variables that will separately store hour, minute, and second component. And then hh:mm:ss will be obtained by concatenating.
Eg Duration:5798secs
vhh=01
vmm=36
vss=38
hh:mm:ss = 01:36:38
I understand this can be done using trunc and mod.. but i am stuck -- when calculating minute and trunc(duration,60)is >= 60, in this case we need to increase the hour variable.
Please help..
Thanks
I have a requirement of converting a process time duration(in seconds) into hh:mm:ss format..
For this i need to make three variables that will separately store hour, minute, and second component. And then hh:mm:ss will be obtained by concatenating.
Eg Duration:5798secs
vhh=01
vmm=36
vss=38
hh:mm:ss = 01:36:38
I understand this can be done using trunc and mod.. but i am stuck -- when calculating minute and trunc(duration,60)is >= 60, in this case we need to increase the hour variable.
Please help..
Thanks
0