Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is Date:
Allan Martin wrote:
>
> Does anyone know of an IS_Date function or similar, where I could send it a
> string and if it was in a date format, it would return true or false if not?
>
> Allan
You'll need to use PL/SQL
create or replace function is_date(x varchar2) return varchar2 is
p date;
begin
p := to_date(x);
return 'OK';
exception when others then return 'NOT OK';
end;
You may want to try several format masks as well
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Fri Oct 05 2001 - 12:06:31 CDT
![]() |
![]() |