Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Set Date formats in init.ora

568685Mar 30 2007 — edited Mar 31 2007
I want to set the Date formats to remain constant for all times. I can change it in the code by doing the following in SQL script of the php page:

ALTER SESSION set NLS_DATE_FORMAT = 'YYYY-MM-DD';
ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'HH24:MI:SSTZR';

I do not want to make this in the php code because it is temporary. I want to do this in the init.ora file to make it permanent. I tried the following in the init.ora page:

NLS_DATE_FORMAT = 'YYYY-MM-DD';
NLS_TIMESTAMP_TZ_FORMAT = 'HH24:MI:SSTZR';

It did not work. Can someone please tell me how it should be done in the init.ora file?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 28 2007
Added on Mar 30 2007
2 comments
653 views