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

Home -> Community -> Usenet -> c.d.o.misc -> Re: DBD::ORACLE and date fields

Re: DBD::ORACLE and date fields

From: Christian Kirsch <kirsch_at_akademie.de>
Date: 1998/05/29
Message-ID: <356E93D7.11E195F1@akademie.de>#1/1

Larry Donohoe wrote:
>
> I'm trying to insert data into a date field using ora_open and ora_bind.
> I'm only able to do this is the format of the input is in the default
> Oracle format DD-MON-YY. I want to use data with the format
> YYYY-MON-DD. If I try to use TO_DATE and a mask, ora_bind aborts with
> the error: ORA-01858: a non-numeric character was found where
> a numeric was expected (DBD: oexec error)
> I'm using DBD::ORACLE ver. 0.47, DBI .90, Oracle Emulator 1.35 and perl
> 5.004. Is there a way around this or am I stuck with the default format?

I've had similar problems with the german date format. It seems that Oracle is extremely picky in this context.

Here's what I do:

  $ENV{NLS_DATE_LANGUAGE}="GERMAN";
  $ENV{NLS_DATE_FORMAT}="DD.MM.YYYY"; before connecting to Oracle (you'd have to take other values, of course :-)
and then I just make sure that the dates I want to insert into the tables.
You should consult the Oracle manual for to_date and to_char -- I find this quite irritating, though.

Christian Received on Fri May 29 1998 - 00:00:00 CDT

Original text of this message

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