I want to insert and query the Date values in"yyyy-mm-dd hh24:mm:ss" format.
I can not use to_date function.
So, i created a trigger in my DB script as follows,
CREATE OR REPLACE TRIGGER DATE_TRIG
AFTER LOGON ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';
END;
After restarted the oracle instance ,
select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
NLS_DATE_FORMAT yyyy-mm-dd hh24:mi:ss
But when i check the date column the value was inserted as"2010-01-12". There is no hour minute second value.
Why is that?
I have to insert hour min sec also. Where i did wrong ?
can somebody help me? I need it very urgent?
Thanks.
-viji
Edited by: user12437966 on Jan 12, 2010 1:12 AM