Change Date format for Schema only
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Change Date format for Schema only

  1. #1
    Join Date
    Feb 2005
    Posts
    49

    Change Date format for Schema only

    Dear Developers,
    is it possible to change the date format of the schema from dd/mm/yyyy to mm/dd/yyyy ?
    I want to change it only for a specific schema .

    Thanks
    Aiman Al-Jumoay

  2. #2
    Join Date
    Aug 2002
    Posts
    4
    Hi,

    it is not possible to change the date format on the schema level.
    you can do this on the database instance level.

  3. #3
    Join Date
    Feb 2005
    Posts
    49
    Thanks, I thought it could be done,

    Aiman Al-Jumoay

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    3,999
    You can write your own PL/SQL function, and use that anytime you want to return a date in character format. That function could look at a table which would tell it what format to return dates in.
    this space intentionally left blank

  5. #5
    Join Date
    May 2005
    Posts
    31
    Why do not you write trigger at schema level to change the nls_date_format ?

    for e.g.

    create or replace trigger aftr_logon after logon on scott.schema
    begin
    execute immediate 'alter session set nls_date_format=''mm/dd/yyyy''';
    end;
    /

    Bear in mind you have write this trigger for each of the schema that you want to change the date format.
    Experience is a hard teacher because she gives the test first, the lesson afterwards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width