Oracle中如何獲取系統當前時間
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
ORACLE里獲取一個時間的年、季、月、周、日的函數
select to_char(sysdate, 'yyyy' ) from dual; --年
select to_char(sysdate, 'MM' ) from dual; --月
select to_char(sysdate, 'dd' ) from dual; --日
select to_char(sysdate, 'Q') from dual; --季
select to_char(sysdate, 'iw') from dual; --周
//時間格式化方法
to_date('2009-12-25 14:23:31(時間)','yyyy-mm-dd,hh:mi:ss'(格式))
————————————————