写个函数,要转换的字符串作为参数。
create or replace function fun_date_YorN(i_dt varchar2) return number is
v_dt date;
begin
v_dt := to_date(i_dt, 'yyyymmdd');
return 1;
exception
when others then
return 0;
end fun_date_YorN;
正确的日期返回1,错误返回0
写个函数,要转换的字符串作为参数。
create or replace function fun_date_YorN(i_dt varchar2) return number is
v_dt date;
begin
v_dt := to_date(i_dt, 'yyyymmdd');
return 1;
exception
when others then
return 0;
end fun_date_YorN;
正确的日期返回1,错误返回0