반응형
–1시간 더하기
select to_char(to_date(’121212′,’hh24miss’)+1/24,’hh24:mi:ss’) from dual;
…
–30분 더하기
select to_char(to_date(’121212′,’hh24miss’)+30/24/60,’hh24:mi:ss’) from dual;
select to_char(to_date(’121212′,’hh24miss’)+30/(24*60),’hh24:mi:ss’) from dual;
…
–40초 더하기
select to_char(to_date(’121212′,’hh24miss’)+40/24/60/60,’hh24:mi:ss’) from dual;
select to_char(to_date(’121212′,’hh24miss’)+40/(24*60*60),’hh24:mi:ss’) from dual;
…
–12시간 58분 58초 더하기
select to_char(to_date(’121212′,’hh24miss’)+12/24 + 58/24/60 + 58/24/60/60,’hh24:mi:ss’) from dual;
…
– 시: 분: 초 가져오기
select substr(’125858′,1,2), substr(’125858′,3,2), substr(’125858′,5,2) from dual;
…
…
[참고] http://julymorning.co.kr/xe/index.php?document_srl=3798&mid=tiptech_prog