Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help: Using DBMS_SESSION to set NLS_DATE_FORMAT
Am I missing something obvious here!? I'm looking to programatically set the
NLS_DATE_FORMAT parameter using the SET_NLS procedure in the system package
DBMS_SESSION. I can set this (and other formats):
begin
dbms_session.set_nls('NLS_DATE_FORMAT', '''MM/DD/YYYYHH:MI:SS''');
end;
but not this (which is, of course, what I want):
begin
dbms_session.set_nls('NLS_DATE_FORMAT', '''MM/DD/YYYY HH24:MI:SS''');
end;
The following exception is raised:
ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "SYS.DBMS_SESSION", line 46 ORA-06512: at line 2
Any ideas would be greatly appreciated. TIA,
Gerard
![]() |
![]() |