I'm trying to create a procedure that takes in a string in 'HH:MI:SS' format and RETURN the number of seconds.

I want to parse out the number of hours, minutes and seconds from the string and return the number of seconds for the value passed in.

The procedure is created successfully but when I try calling it I get an error. Can someone please let me know how to fix this problem.

Thanks in advance to all who answer.

```
CREATE OR REPLACE PROCEDURE CONVERT_TO_SECONDS( 
  i_date_string IN VARCHAR2,
    o_seconds      OUT PLS_INTEGER 
)
AS
 l_hours      NUMBER;
 l_minutes  NUMBER;
 l_seconds  NUMBER;
BEGIN
SELECT trim('"'
  FROM regexp_substr(i_date_string,'".*?"|[^:]+',1,1)) hours,
    trim('"'
  FROM regexp_substr(i_date_string,'".*?"|[^:]+',1,2)) minutes,
    trim('"'
  FROM regexp_substr(i_date_string,'".*?"|[^:]+',1,3)) seconds
      INTO l_hours ,
    l_minutes ,
    l_seconds
  FROM dual ;

o_seconds := 
     l_hours*3600 +  
     l_minutes*60 +
     l_seconds;

END;

SELECT CONVERT_TO_SECONDS('08:08:08') FROM DUAL;

```