Programming/Oracle
[Oracle] 날짜 차/시간 차/분 차/초 차이 구하기.
19760323
2017. 5. 30. 12:28
● 날짜 차이
select to_date('2017-08-26','yyyy-mm-dd') -sysdate from dual;
● 차이 시간
select (to_date('2017-08-26','yyyy-mm-dd') -sysdate) * 24 from dual;
● 차이 분
select (to_date('2017-08-26','yyyy-mm-dd') -sysdate) * 24 * 60 from dual;
● 차이 초
select (to_date('2017-08-26','yyyy-mm-dd') -sysdate) * 24 * 60 * 60 from dual;