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;