본문 바로가기

프로그래밍/oracle

oracle - 요일계산(2)

반응형

select  to_char(sysdate, 'd')

from dual;


select to_char(to_date(sysdate - to_char(sysdate, 'd')+2), 'mm/dd'), to_char(to_date(sysdate - to_char(sysdate, 'd')+ 6), 'mm/dd')

from dual


select to_char(to_date(sysdate - to_char(sysdate, 'd')+6), 'mm/dd'), to_char(to_date(sysdate - to_char(sysdate, 'd')+ 8), 'mm/dd')

from dual


반응형