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: wozi <wozi_at_dhc.net>
Date: Wed, 26 May 1999 09:50:03 -0700
Message-ID: <AD340A35CBD6BFBF.75EA641474EE4CEA.A22EAE884B0A6CF4@library-proxy.airnews.net>


The default date starts out as 'DD-MON-YY', but you can change this with alter session set NLS_DATE_FORMAT for a given SQL session or with the NLS_DATE_FORMAT INIT.ORA paramter

You can also use date functions as in the example below

insert into table_s(field_1,date_field)  values('string_data', (TO_DATE('05-27-99','MM/DD/YY')));

SQL> INSERT INTO TB VALUES(TO_DATE('05-27-99','MM/DD/YY')); 1 row created.

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 - 11:50:03 CDT

Original text of this message

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