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

Thread: Date format

  1. #1
    Join Date
    Jan 2002
    Posts
    474

    Date format

    What is the default date format in Oracle ??? Is it 'mm-dd-yyyy'???

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    The default data format is based on your NLS_DATE_FORMAT init.ora parameter. In 8.1, the default format is 'DD-MON-YY'.

    Code:
    SQL> select sysdate from dual;
    
    SYSDATE
    ---------
    18-NOV-02
    
    SQL> alter session set nls_date_format="mm/dd/yyyy hh24:mi:ss";
    
    Session altered.
    
    SQL> select sysdate from dual;
    
    SYSDATE
    -------------------
    11/18/2002 11:01:52
    
    SQL> alter session set nls_date_format="yyyy.mm.dd hh24.mi.ss";
    
    Session altered.
    
    SQL> select sysdate from dual;
    
    SYSDATE
    -------------------
    2002.11.18 11.02.52
    
    SQL>
    Jeff Hunter

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