...
The following trigger will do the trick by setting the right format every time the db user (in this example 'ofbiz') will connect to the db: this user must be the one you set in the entityengine.xml file:
Code Block |
---|
create or replace TRIGGER ON_CONNECT AFTER LOGON ON DATABASE |
...
DECLARE |
...
guser varchar2(30); |
...
begin |
...
SELECT sys_context('USERENV','SESSION_USER') into guser FROM dual; |
...
if guser='ofbiz' THEN |
...
EXECUTE IMMEDIATE 'alter session set nls_timestamp_format = ''YYYY-MM-DD HH24:MI:SS.FF'''; |
...
end |
...
if |
...
; |
...
end; |
Thanks to Giorgio Tomaselli for this script.
This solution is valid for the "ORA-01830: date format picture ends before converting entire input string" error too in Oracle 10g.
How to set the format of Dates
...