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: Newbie - Date Format Problem

Re: Newbie - Date Format Problem

From: Mark Gumbs <mgumbs_at_nospam.hotmail.com>
Date: Wed, 26 May 1999 15:23:07 +0100
Message-ID: <374c0198.0@145.227.194.253>


What you typed looks like a date to you but in fact is a string to oracle. You need to convert it to a date using a format mask

Try...
insert into table_s (field_1, date_field) values ('string_data', to_date('05-27-99','MM-DD-YY') );

Mark

Alex Daman wrote in message <01bea781$b40fb2a0$81fca8c0_at_alexd>...
>Hello All,
>
>I have just installed Oracle Server 7.3.4 on our AIX machine.
>When inserting into a date field, I keep getting an - Invalid month no
>error.
>Is there an environment variable that ORACLE uses that will allow me to
>format my dates.
>e.g. :
>insert into table_s (field_1, date_field) values ('string_data',
>'05-27-99');
>
>But if I format the date data as '05-May-99' it works.
>
>Thanks in advance.
>
>Alex
Received on Wed May 26 1999 - 09:23:07 CDT

Original text of this message

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