to_date function pl/sql
Posted
by christine33990
on Stack Overflow
See other posts from Stack Overflow
or by christine33990
Published on 2010-03-25T12:02:15Z
Indexed on
2010/03/25
12:13 UTC
Read the original article
Hit count: 867
undefine dates
declare
v_dateInput VARCHAR(10);
v_dates DATE;
begin
v_dateInput := &&dates;
v_dates := to_date(v_dateInput,'dd-mm-yyyy');
DBMS_OUTPUT.put_line(v_dates);
end;
Not sure why whenever I run this code with ,for example , input of 03-03-1990, this error shows up.
Error report:
ORA-01847: day of month must be between 1 and last day of month
ORA-06512: at line 6
01847. 00000 - "day of month must be between 1 and last day of month"
*Cause:
*Action:
© Stack Overflow or respective owner