create or replace FUNCTION MIN_TO_HOUR(
    P_MIN NUMBER)
  RETURN VARCHAR2
IS
  V_HOUR NUMBER;
  V_MIN  NUMBER;
BEGIN
  IF(P_MIN IS NULL) THEN
    RETURN NULL;
  END IF;
V_HOUR :=TRUNC(P_MIN/60,0);
V_MIN  :=MOD(P_MIN,60) ;
RETURN V_HOUR||':'||V_MIN;
END;
 