获取过去一年每个月月末时间
获取过去一年每个月月末时间:
SELECT last_day(ADD_MONTHS(ADD_MONTHS(sysdate,-12), ROWNUM - 1)) as monthlist
FROM DUAL
CONNECT BY ROWNUM <=
months_between(SYSDATE,
ADD_MONTHS(sysdate,-12)) + 1;
select last_day(to_date('201409','yyyymm')) from dual;