开发者

Oracle - derive minutes from a Timestamp value

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜