Here's the code needed.
I've edited the content.
CREATE OR REPLACE TRIGGER horaire_heure
BEFORE INSERT OR UPDATE ON Horaire
FOR EACH ROW
BEGIN
:NEW.heure_debut := to_char(:NEW.heure_debut,'hh24:mi:ss');
:NEW.heure_fin := to_char(:NEW.heure_fin,'hh24:mi:ss');
END;
/
And the input
INSERT INTO Horaire
VALUES (1,2,TO_DATE('02/01/2000 13:30:00','DD/MM/YYYY HH24:MI:SS'),TO_DATE('02/01/2000 16:30:00','DD/MM/YYYY HH24:MI:SS'),NULL);
Now it pop ups ORA-01843. Telling me the month is not valid.
What's wrong?