小编use*_*285的帖子

to_date函数pl/sql

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;
Run Code Online (Sandbox Code Playgroud)

不确定为什么每当我运行此代码时,例如03-03-1990的输入,此错误就会显示出来.

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:
Run Code Online (Sandbox Code Playgroud)

oracle plsql plsqldeveloper

1
推荐指数
1
解决办法
2796
查看次数

标签 统计

oracle ×1

plsql ×1

plsqldeveloper ×1