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

Thread: date format(try it)

  1. #1
    Join Date
    Feb 2001
    Posts
    103
    Hi,
    i want to convert the date format . The default date format in oracle is dd-mon-yy. I want that my default date format should be dd-mon-yyyy. I tried changing initorcl.ora . But it does not work.
    e.g:-whenever i write "select sysdate from dual". The date format is dd-mon-yy. I want that this date format should be dd-mon-yyyy.

    thankx in advance.
    When the going gets tough, the tough gets going

  2. #2
    Join Date
    Dec 2000
    Posts
    126
    try
    select to_char(sysdate,'dd-mon-yyyy')
    from dual

  3. #3
    Join Date
    Feb 2001
    Posts
    203
    set nls_date_format ='DD-MON-YYYY'
    to your session
    sree

  4. #4
    Join Date
    Jul 2000
    Location
    india
    Posts
    213
    hi akhil
    change in ur login.sql file
    and set date format as dd-mon-yyyy
    regards
    amit

  5. #5
    Join Date
    Feb 2001
    Posts
    123
    Although setting the nls_date_format parameter will sort out your immediate problem, it is dangerous to rely on default date formats like that (if a session runs the code without having the date format set, the code breaks - and, of course, there are portability issues). It is better to explicitly set the date format whenever the date is used by using the to_char(sysdate, 'dd-mon-yyyy') function.

    HTH

    David.

  6. #6
    Join Date
    Feb 2001
    Posts
    286

    Hi!akhil!Reg:NLS_DATE_FORMAT!

    hi!

    I was able to set the NLS_DATE_FORMAT ON NT successfully to-day thus which successfully returns date format in 2001 whenever we type 001.

    Do it this way:

    1.Open your WINNT Server My Computer Property settings and go to Environment Settings.There type NLS_DATE_FORMAT and in the value type DD-MON-YYYY.

    2.Next, on your Client NT machines,do the same environment settings .

    3.After that Log in to sql*plus,and then type:

    select sysdate from dual;

    Hope this helps!

    Let me know after you've finished up with this config successfully!

    BTW:any idea how to set up NLS_DATE_FORMAT DD-MON-YYYY on WIN98 platforms!

    Regards,

    Amitstora.

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