Date format changes while fetching the record in a cursor [message #308050] |
Thu, 20 March 2008 18:46 |
harshnayak
Messages: 12 Registered: July 2007 Location: Los Angeles
|
Junior Member |
|
|
The date in our table is stored using the oracle DATE data type. It is stored in MM/DD/YYYY format. Now, when I am trying to fetch this date column using a cursor, the variable (DATE type inside pl/sql code) that takes this date changes the format to DD-MON-YY. How can I fetch the date in exactly the same manner as it is in the table?
|
|
|
|
Re: Date format changes while fetching the record in a cursor [message #308052 is a reply to message #308051] |
Thu, 20 March 2008 19:04 |
harshnayak
Messages: 12 Registered: July 2007 Location: Los Angeles
|
Junior Member |
|
|
What I meant was, we stored it in MM/DD/YYYY format in the table. And the NLS_DATE_FORMAT has been set to DD-MON-YYYY. But, when I fetch the record, I lose the YYYY information. So a date which is stored as '12/12/2067' in the database becomes '12-DEC-67' when I fetch it. And then it is interpreted as 12-DEC-1967.
|
|
|
|
|