oracle 判断是否是日期

自定义函数,是日期类型返回1,否则返回0.

create function fun_is_date(i_dt varchar2) return number is
v_dt date;
begin
v_dt := to_date(nvl(i_dt, 'a') , 'yyyy-mm-dd');
return 1;
exception
when others then
return 0;
end fun_is_date;

原文地址:https://www.cnblogs.com/jiangqingfeng/p/11002445.html