Oracle获取本周、上周、前几周时间

select trunc(next_day(sysdate, 1)-6),trunc(next_day(sysdate, 1))  from dual;------本周
select trunc(next_day(sysdate - 7, 1)-6),trunc(next_day(sysdate - 7, 1))  from dual;------上周
select trunc(next_day(sysdate - 14, 1)-6),trunc(next_day(sysdate - 14, 1))  from dual;------上上周
select trunc(next_day(sysdate - 21, 1)-6),trunc(next_day(sysdate - 21, 1))  from dual;------上上周
select trunc(next_day(sysdate - 28, 1)-6),trunc(next_day(sysdate - 28, 1))  from dual;------上上周
 

你可能感兴趣的:(Oracle获取本周、上周、前几周时间)