How to convert an interval like “1 day 01:30:00” into “25:30:00”?

后端 未结 6 1497
无人及你
无人及你 2021-01-01 12:25

I need to add some intervals and use the result in Excel.

Since

sum(time.endtime-time.starttime)

returns the interval as \"1 da

6条回答
  •  长情又很酷
    2021-01-01 12:53

    Since there is not an exact solution for the topic:

    => SELECT date_part('epoch', INTERVAL '1 day 01:30:00') * INTERVAL '1 second' hours;
      hours
    -----------
     25:30:00
    (1 row)
    

    Source: Documentation

提交回复
热议问题