Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle date

Re: oracle date

From: Randall J. Parr <RParr_at_TemporalArts.COM>
Date: Sun, 08 Aug 1999 20:59:46 -0500
Message-ID: <37AE3612.7F390E84@TemporalArts.COM>


Thomas Kyte wrote:

> ,,,,,,,,,,,,,,,,,,,,,

Any suggestions on how to set the NLS_DATE_FORMAT or otherwise fix the following problem?

I am trying to insert records with dates which may or may not include the time portion of the date. I am reading these records from a text file using Java and performing the inserts with JDBC.

For exmple A) '07/02/1990' or B) '07/02/1999 00:00:00'

With NLS_DATE_FORMAT set to 'MM/DD/RRRR' date B gives an error (more or less) "ran out of date format before finished".

With NLS_DATE_FORMAT set to 'MM/DD/RRRR HH24:MI:SS' date A gives and error (more or less) "incomplete date"

Is there a way to set a date format (preferably a default format) such that the time portion of the date is optional?

I am trying to avoid solutions which include wrapping the date to be inserted in JDBC escapes and/or TO_DATE( mydate, 'myformat') because I only have column name and column data in the text file (that is, the text file doesn't contain any information about the column types).

Thanks
R.Parr
Temporal Arts Received on Sun Aug 08 1999 - 20:59:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US