{"id":483,"date":"2014-07-16T15:46:06","date_gmt":"2014-07-16T13:46:06","guid":{"rendered":"http:\/\/www.rocworks.at\/wordpress\/?p=483"},"modified":"2014-07-16T16:52:46","modified_gmt":"2014-07-16T14:52:46","slug":"oracle-sum-of-intervals","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=483","title":{"rendered":"Oracle sum of intervals &#8230;"},"content":{"rendered":"<p>When timestamps are used in your tables and you subtract two timestamps then you will get as result a value of type &#8220;interval&#8221;. And it is not possible to sum up intervals. But it can be done by casting to float. The only bad thing is that you will loose the milli seconds&#8230;<\/p>\n<p>CAST((ts1 + 0) &#8211; (ts2 + 0) AS FLOAT)*24*60*60 \/* seconds *\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When timestamps are used in your tables and you subtract two timestamps then you will get as result a value of type &#8220;interval&#8221;. And it is not possible to sum up intervals. But it can be done by casting to float. The only bad thing is that you will loose the milli seconds&#8230; CAST((ts1 + &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=483\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Oracle sum of intervals &#8230;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-483","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=483"}],"version-history":[{"count":2,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}