행위

"오라클 시간차이"의 두 판 사이의 차이

DB CAFE

(새 문서: <div style=" border:solid 1px #cccccc; background: -webkit-linear-gradient(white, #ececec); For Safari 5.1 to 6.0: background: -o-linear-gradient(white, #ececec); /* For Oper...)
 
1번째 줄: 1번째 줄:
 +
SELECT
  
<div style="
+
      TRUNC(EndDate - StartDate) as "일",
border:solid 1px #cccccc;
+
        TRUNC(((EndDate - StartDate) - TRUNC(EndDate - StartDate)) * 24) as "시간",
background: -webkit-linear-gradient(white, #ececec); /* For Safari 5.1 to 6.0 */
+
        FLOOR(((((EndDate - StartDate) -TRUNC(EndDate - StartDate)) * 24)
background: -o-linear-gradient(white, #ececec); /* For Opera 11.1 to 12.0 */
+
        - TRUNC(((EndDate - StartDate)-TRUNC(EndDate - StartDate)) * 24)) * 60) as "분"
background: -moz-linear-gradient(white, #ececec); /* For Firefox 3.6 to 15 */
+
     
background: linear-gradient(white, #ececec); /* Standard syntax */
+
  FROM (             
  padding: 1px 10px 10px 0px;
+
        SELECT TO_DATE('20090101 12:30','yyyymmdd hh24:mi') as StartDate, -- 시작일
line-height:100%;
+
                      TO_DATE('20091001 17:20','yyyymmdd hh24:mi') as EndDate    -- 종료일
color:#489cdf;
+
            FROM DUAL
font-weight:700;
+
        )
font-family: Tahoma, 맑은 고딕,돋움체;
 
font-size:{{{폰트크기|12}}}pt;
 
"> <font color="{{글자색깔|#489cdf}}"><i class="material-icons icon-image-preview"
 
style="
 
    display: inline-block;
 
    transform: translate(-10%, 20%);
 
    "
 
>&nbsp;{{{아이콘이름|notifications_active}}}</i></font>{{{제목|스타일리쉬 타이틀바}}}
 
 
 
</div>
 

2021년 4월 8일 (목) 17:30 판

thumb_up 추천메뉴 바로가기


SELECT

      TRUNC(EndDate - StartDate) as "일", 
        TRUNC(((EndDate - StartDate) - TRUNC(EndDate - StartDate)) * 24) as "시간", 
        FLOOR(((((EndDate - StartDate) -TRUNC(EndDate - StartDate)) * 24) 
        - TRUNC(((EndDate - StartDate)-TRUNC(EndDate - StartDate)) * 24)) * 60) as "분"
      
 FROM (               
       SELECT TO_DATE('20090101 12:30','yyyymmdd hh24:mi') as StartDate,  -- 시작일
                      TO_DATE('20091001 17:20','yyyymmdd hh24:mi') as EndDate    -- 종료일
            FROM DUAL
       )