Oracle 取当前日期的前一个月的第一天和最后一天
前一月 最后一天select last_day(add_months(sysdate,-1)) from dual; 2010-2-28 9:23:01;
select to_char(last_day(add_months(sysdate,-1))) from dual; 2010-2-28;
前一月 第天 select add_months(last_day(add_months(sysdate,-1))+1,-1) from dual; 2010-2-1 9:23:01;
select to_char(add_months(last_day(add_months(sysdate,-1))+1,-1)) from dual; 2010-2-1 9:23:01;