I have a 开发者_如何学Ctable with a Timestamp(6) column called START_DATE. Given this query:
SELECT SYSDATE - MIN(START_DATE) FROM MYTABLE
might return:
0 1:12:32.2819281
I want that returned value in minutes, rounded to nearest minute, no decimal place, e.g.:
73
I know how to do this with queries that don't aggregate, by CAST'ing the START_DATE to a DATE, and then using ROUND, but as soon as I put in the MIN aggregation, that method doesn't work.
Thanks!
Check out the stored procedure on this page: Oracle Timestamp Math
精彩评论