Reputation:
SET SERVEROUTPUT ON
CREATE PROCEDURE check(date_in IN date)
IS
v_date date;
BEGIN
v_date:=date_in;
dbms_output.put_line(v_date);
END;
.
run;
execute check('2011/06/06'); error code-ora-1861 ,literal does not match string format. In which format should I enter it?
EDIT: I do not want to use to_date
Upvotes: 0
Views: 127
Reputation: 52376
You should use the format that the session expects, which you could probably infer from:
select sysdate from dual;
In any case, you can just use the ISO date format ...
execute check(date '2011-06-06')
Upvotes: 0
Reputation: 23035
Don't worry about the default format. You can specify it explicitly:
execute check(TO_DATE('2011/06/06', 'YYYY/MM/DD'));
Upvotes: 0