oracle sql语句获取当前月的第一天,和最后一天

2020-11-20 15:09:35 浏览数 (2)

代码语言:javascript复制
 select to_char((last_day(to_date(to_char(sysdate,'mm')-1,'mm')) 1),'yyyy-mm-dd') as startday,to_char(last_day(sysdate),'yyyy-mm-dd') as lastday from dual;

0 人点赞