日期:2014-05-17 浏览次数:21261 次
select to_date('2014-03-04 08:15:00', 'yyyy-mm-dd hh24:mi:ss') +
(rownum - 1) / (24 * 60 / 15)
from dual
connect by rownum <=
(trunc(to_date('2014-03-04 22:45:00', 'yyyy-mm-dd hh24:mi:ss'),
'mi') -
trunc(to_date('2014-03-04 08:15:00', 'yyyy-mm-dd hh24:mi:ss'),
'mi')) * 24 * (60 / 15) + 1
SELECT TO_CHAR(S_DT + (ROWNUM - 1) * 15 / 1440, 'hh24:mi:ss')
FROM (SELECT TO_DATE('08:15:00', 'hh24:mi:ss') S_DT,
TO_DATE('22:45:00', 'hh24:mi:ss') E_DT
FROM DUAL) T
CONNECT BY S_DT + (ROWNUM - 1) * 15 / 1440 <= E_DT;