Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
DECLARE
v_hours NUMBER;
v_mins NUMBER;
v_seconds NUMBER;
v_first VARCHAR2 (20) := '12:43:34';
v_last VARCHAR2 (20) := '13:25:55';
v_result VARCHAR2 (20);
BEGIN
v_seconds := SUBSTR (v_first, 7, 2) + SUBSTR (v_last, 7, 2);
v_mins := SUBSTR (v_first, 4, 2) + SUBSTR (v_last, 4, 2);
v_hours := SUBSTR (v_first, 1, 2) + SUBSTR (v_last, 1, 2);
IF v_seconds > 59
THEN
v_mins := v_mins + 1;
END IF;
SELECT CASE
WHEN v_seconds > 59
THEN v_seconds - 60
ELSE v_seconds
END
INTO v_seconds
FROM DUAL;
IF v_mins > 59
THEN
v_hours := v_hours + 1;
END IF;
SELECT CASE
WHEN v_mins > 59
THEN v_mins - 60
ELSE v_mins
END
INTO v_mins
FROM DUAL;
SELECT CASE
WHEN v_hours > 23
THEN v_hours - 24
ELSE v_hours
END
INTO v_hours
FROM DUAL;
v_result := v_hours || ':' || v_mins || ':' || v_seconds;
DBMS_OUTPUT.put_line (v_result);
END;