wood burning stoves 2.0
The moose likes Oracle/OAS and the fly likes Oracle date format issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Oracle date format issue" Watch "Oracle date format issue" New topic

Oracle date format issue

Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
I have one table having one column create_date and data type for same is DATE.
One external program populating this column's values in DD-Mon-YY format. Ideally for e.g if external sytem want to populate this column value with value like '27-04-11'.
it is refelcting as 27-04-1911 in table's columns .
So any one have any idea or faced some issue please suggest.

I am using Oracle10g.

Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
Hi Anand,

Try DD-Mon-RR format.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1141

If I remember correctly, DATE values are stored in Oracle database as numbers that take up seven bytes of storage.
Date formats are only used for displaying the date.
Hence the format you use is entirely arbitrary.
And since the Y2K bug, I believe most people would agree with me that using four digit years in date formats is preferrable.

Good Luck,
P.S. By the way, as far as I know, eg is an abbreviation for the phrase "for example" so I would say that writing "for eg" means "for for example" which doesn't sound correct to me.
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
Thanks both ,Nice advice, i will try and share the results with you as well.
I agree. Here's the link: http://aspose.com/file-tools
subject: Oracle date format issue
It's not a secret anymore!