One of my queries is returning the below interval
. Istead of showing 6 days
, I would like to sho开发者_StackOverfloww 6 x 24 + 19 hours. I would rather not convert to epoch using the extract (epoch from ...)
operator. Is there a quick an easy way to do it?
usage_minus_lost_data_gaps_and_battery_charge
-----------------------------------------------
6 days 19:18:21
(1 row)
Something like this could probably help:
# select to_char('6 days 19:18:21'::interval, 'DD x 24 + HH24 hours');
to_char
--------------------
06 x 24 + 19 hours
(1 row)
精彩评论