Oracle Convert Seconds to Hours:Minutes:Seconds

前端 未结 14 1138
再見小時候
再見小時候 2020-12-08 06:01

I have a requirement to display user available time in Hours:Minutes:Seconds format from a given total number of seconds value. Appreciate if you know a ORACLE function to d

14条回答
  •  眼角桃花
    2020-12-08 06:33

    If you have a variable containing f.e. 1 minute(in seconds), you can add it to the systimestamp then use to_char to select the different time parts from it.

    select to_char(systimestamp+60/(24*60*60), 'yyyy.mm.dd HH24:mi:ss') from dual
    

提交回复
热议问题