CREATE OR REPLACE FUNCTION is_dates (parmin VARCHAR2) RETURN NUMBER IS val DATE; BEGIN val := TO_DATE (NVL (parmin,'a'),'yyyy-MM-dd'); RETURN 1; EXCEPTION WHEN OTHERS THEN RETURN 0;
使用: select is_dates(to_char(sysdate,'yyyy-MM-dd')) from dual原文链接:https://www.f2er.com/oracle/211915.html