Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?

senthilmcaJul 19 2007 — edited Jul 19 2007
Hi

How to Insert date in 'DD/MM/YYYY' format in oracle using stored procedure?

This is my Input data.
11/25/2007.

By using below query, it is inserted into database.

sql>Insert into tblname values(to_date('11/25/2007','MM/DD/YYYY'));

But using stored procedure, the same query is not running.
It shows error like
ORA-01843: not a valid month ORA-06512: at line 1

Procedure:

create or replace procedure Date_Test(datejoin in DATE) is
begin
insert into datetest values(to_date(datejoin,'MM/DD/YYYY'));
end Date_Test;

I had used 'nls_date_language = american' also.

Prcodeure is created but not worked in jsp. The same error is thrown.

Pls provide a solution
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2007
Added on Jul 19 2007
2 comments
6,292 views