The following is my query for Oracle SQL Developer:
INSERT INTO ENROLLMENTS (DATE,PARTNER_NAME,ENROLLMENTS)
SELECT TO_CHAR(TS, \'DD-MON-YYYY HH AM\') AS DATE
Basically you are trying to store a string which represents a date in a timestamp field. If you replace:
TO_CHAR(TS, 'DD-MON-YYYY HH AM')
by
TRUNC(TS, 'hh24')
at all 4 places it should work.
INSERT INTO ENROLLMENTS (DATE,PARTNER_NAME,ENROLLMENTS)
SELECT TRUNC(TS, 'hh24') AS DATE, mrch_bnft_cd, COUNT(*)
FROM ENROLLMENTS
WHERE TS > trunc(sysdate-1/24, 'HH') + 5/24
AND TS < trunc(sysdate, 'HH') + 5/24
GROUP BY TRUNC(TS, 'hh24'), mrch
ORDER BY TRUNC(TS, 'hh24'), mrch_bnft