获取过去一年每个月月末时间

获取过去一年每个月月末时间:

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;

posted @ 2018-08-03 09:48  baby孔祥超  阅读(399)  评论(0编辑  收藏  举报