date format in a Trigger

From: Jochen Pege <>
Date: Wed, 13 Dec 2000 17:35:32 +0100
Message-ID: <9188ji$841$>

Hello everybody,

today I Ihave found a problem with the date format in my Before Insert Trigger. In the Trigger I want to update a field called RES_LastChange its datatype is date. In the Trigger I use a SQL statement. It is something like

    v_sql:= 'Update Resourcen Set ... RES_LastChange= ''' || sysdate || ''' where RES_ID= ' || v_id;

    Execute Immediate v_sql;

After this Update the date is stored like

When I try to make a select statement with to_char([Fieldname], ' hh24:mi:ss) I receive 00:00:00

Now it seems that I'm not able to store the time of updating.

It didn't work with

    v_sql:= 'Update Resourcen Set ... RES_LastChange= ''' || to_date(sysdate, ' hh24:mi:ss') || ''' where RES_ID= ' || v_id;

    Execute Immediate v_sql;


    :new.RES_LastChange:= sysdate;
I have no problems to store the time, but in my case it is not possible to store the time in this way.

Can anybody solve this problem and tell me who.

Best regards

Jochen Received on Wed Dec 13 2000 - 17:35:32 CET

Original text of this message