Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can Oracle 7.x store 4-digit year dates?
Erwan Layman <erwan_at_contact.com.sg> wrote:
>I am new to Oracle and I'm wondering if i can extend the year part of a
>DATE data type into 4 digits, ie, DD-MMM-YYYY. I want to avoid revamping
>my tables when year 2000 comes.
Oracle always stores dates internally as numerical values, if you only see two digits for the year, that's simply a setting of preference for your session.
Check out the ALTER SESSION SET NLS_DATE_FORMAT command. You can set any kind of date display you would like to have with it.
HTH
Marc