Converting time difference to a given format in Oracle

后端 未结 4 1515
情书的邮戳
情书的邮戳 2021-01-17 22:34

How do I convert EVENT_DATE_B - EVENT_DATE_A which is a number of days to string with HH:MM format?

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 23:02

    select 24 * (EVENT_DATE_B - EVENT_DATE_A) || ':' || '00'
    from your_table
    

    SQLFiddle demo

提交回复
热议问题