DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Changing Date and Time

  1. #1
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94

    Changing Date and Time

    Hi all,
    Suppose of some reason you would like to change the time oracle database,
    1. Do you know how to change the and time of database.
    2. And how to change the format of sysdate reporting Hard code in the database. You can use:
    select to_char(sysdate, 'YYYY-MM-DD hh:min:ss') from sysdate;
    How can change the time format of database to get the time of database as the answer to above query from sysdate.

    Thanks Hamid

  2. #2
    Join Date
    Jul 2002
    Location
    Washington DC
    Posts
    110
    1. Do you know how to change the and time of database.

    Oracle Server time depends on OS time.Change us OS time.

    2. And how to change the format of sysdate

    Default, is DD-MON-YY
    U can change like as follows

    Alter session set nls_data_format='dd/mm/yyyy';(or the avialable date formats in oracle)

  3. #3
    Join Date
    Feb 2003
    Location
    Tehran/Iran
    Posts
    94
    Hi,
    Thanks for the answer. Do you know how to change permanently for the hole database not for the session.

    Regards Hamid

  4. #4
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    You can set that in the init.ora file

    regards
    Hrishy

  5. #5
    Join Date
    Jul 2002
    Location
    Washington DC
    Posts
    110
    Update the value of nls_date_format in init.ora and restart the database

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