Re: Oracle date format

From: Richard Kuhler <noone_at_nowhere.com>
Date: Thu, 04 Nov 2004 19:45:16 GMT
Message-ID: <gFvid.34023$hN1.20409_at_twister.socal.rr.com>


Bill Li wrote:
> Hi all,
> I am trying to insert date/time value into a column with datatype date.
> During this insertion, I cannot use to_date or any other Oracle functions.
>
> When I use the string, '01-jan-2004', the value is inserted okay. However,
> when I included the time, e.g. '01-jan-2004 01:01:01', I get the error
> ORA-01830 (date format picture ends before converting entire input string).
>
> Does anyone know what is the native string value I can use to when insert
> into a date datatype?

There are no "native string values". The database is configured to accept a certain format via the NLS_DATE_FORMAT parameter. That's the only reason '01-jan-2004' works for you to begin with. If you want to use a different format than you either have to change the database or session configuration or use an override type function like TO_DATE.

--
Richard Kuhler
Received on Thu Nov 04 2004 - 20:45:16 CET

Original text of this message