1.
select
((((
((to_number(to_char(cur_date,'YYYY'))-1988)*12*31*24*60*60) +
((to_number(to_char(cur_date,'MM'))-1)*31*24*60*60) +
(((to_number(to_char(cur_date,'DD'))-1))*24*60*60) +
(to_number(to_char(cur_date,'HH24'))*60*60) +
(to_number(to_char(cur_date,'MI'))*60) +
(to_number(to_char(cur_date,'SS')))
) * (16*1024)) - 12821569053984)
/ (16*1024*60*60*24)
) headroom
from (select to_date('2012-05-30 15:09:57','yyyy-mm-dd hh24:mi:ss') cur_date from dual);
阅读(643) | 评论(0) | 转发(0) |