日期:2014-05-16 浏览次数:20442 次
//当时时间2012-11-01
select trunc(sysdate,'yyyy') from dual
--2012-1-1
select trunc(sysdate,'MM') from dual
--2012-11-1
select trunc(sysdate,'dd') from dual
--2012-11-1
select trunc(sysdate,'q') from dual
--2012-10-1,季度:2012-1-1,2012-4-1,2012-7-1,2012-10-1
select trunc(to_date('2012-02-01','yyyy-MM-dd'),'q') from dual
--2012-1-1
select trunc(sysdate,'hh24') from dual
--2012-11-1 10:00:00
select trunc(sysdate,'mi') from dual
--2012-11-1 10:13:00
?