Oracle Database Is Function (IsDate, )

Card Puncher Data Processing

IsDate

create or replace function IsDate( p_str in varchar2, p_format in varchar2 ) return number AS
V_date date;
BEGIN
    V_Date := to_date( p_str, p_format );
    return 1;
exception
   when others then
      return 0;
end;

Example :

select DATE_FROM 
from Table
where ISDATE(DATE_FROM,'YYYYMMDD') = 1





Discover More
Card Puncher Data Processing
Oracle Database

Documentation about the Oracle database



Share this page:
Follow us:
Task Runner